-
Notifications
You must be signed in to change notification settings - Fork 160
Closed
Labels
Description
- Laravel Vite Plugin Version: 0.2.2
- Laravel Version: 9.17.0
- Node Version: 18.0.0
- NPM Version: 8.6.0
Description:
Right now we're storing the hot file directory in the public directory.
What this means is that if we have multiple devservers running they're going to fight over that hot file.
Instead I'm thinking we should probably be joining the build directory onto the path,
this would mean each devserver would have it's own hotFile location.
I.e. lines like
const hotFile = path.join(pluginConfig.publicDirectory, 'hot');
become
const hotFile = path.join(pluginConfig.publicDirectory, pluginConfig.buildDirectory, 'hot');
This would also require an update to the PR open in Laravel so it takes the build directory into account when looking for the hot file.
In the stock standard setup all it means is the hot file would end up in public/build/hot instead of public/hot
Steps To Reproduce:
- Have multiple build process (e.g. resources/frontend/vite.config.js and resources/backend/vite.config.js)
- Attempt to run the devserver (vite) from both at the same time.