Skip to content

Commit

Permalink
Done!
Browse files Browse the repository at this point in the history
  • Loading branch information
andrefelipe committed Oct 26, 2020
1 parent 952fdda commit de965ed
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ A bare-minimum setup to serve as example to adapt to other scenarios (WordPress,

### Status

Works gracefully!
- Works gracefully!

### Development host

A characteristic of this setup is that you'll run your project from your own local server, for exemple http://vite-php-setup.test

Vite will be running at http://localhost:3000 where our script and styles will be loaded from, but accesing http://localhost:3000 directly will be empty.

Of course, HMR and styles will work just fine! And fast!

### Notes about our example code

Expand All @@ -20,4 +28,6 @@ Works gracefully!

A limitation is Vite's port during development, PHP helpers must match the one that was created during "npm run dev" (default 3000). For example, if the port 3000 is in use, Vite will try the next one (3001 and so on), so our helper PHP doesn't know about that.

So make sure Vite dev started at http://localhost:3000

Currently haven't thought of a way to overcome this. It's rare anyway, and some solutions would polute our vite.config anyway.

0 comments on commit de965ed

Please sign in to comment.