Hot file should be stored in build directory
See original GitHub issue- 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.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Storing object files in a build directory (Makefile)
I'm trying to store all my object files in a build directory. In the root folder I have my Makefile, and the following...
Read more >What is build directory? - Ask Ubuntu
And yes, it is usually called build in various documentations, but it can be called anything. It's just a temporary directory. If the...
Read more >Dealing with files - Learn web development | MDN
Choose a place to store your website projects. Inside your chosen place, create a new folder called web-projects (or similar). This is where...
Read more >Output Management - webpack
Webpack will generate the files and put them in the /dist folder for you, but it doesn't keep track of which files are...
Read more >Establishing a build environment | Android Open Source Project
This section describes how to set up your local work environment to build the Android source files. You must use Linux; building under ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It would also be cleared out when a build occurs, so you wouldn’t end up with a “hot” file in your built assets (as Vite always clears it out)
Putting the hot file in the build directory by default is interesting as it would mean that the file would never end up in git if for whatever reason node doesn’t clean the file up.