Dist file being deleted when saving src file with no changes
See original GitHub issue- Laravel Mix Version: 0.12.1
- Node Version (
node -v
): 7.9.0 - NPM Version (
npm -v
): 4.2.0 - OS: Mac OS Sierra Version 10.12.5
Description:
Whenever I save my src/js/app.js or src/scss/app.scss, my dist/js/app.js and vendors (if I extract them) will get deleted, so I have to make a real change like writing a console.log() or deleting some lines for it to recompile and recreate the file.
Steps To Reproduce:
I’ve tested a clean installation of laravel-mix in a non-laravel project, with the following config in webpack.mix.js:
mix.js(‘src/js/app.js’, ‘dist/js’) .sass(‘src/scss/app.scss’, ‘dist/css’);
1 - $ npm run watch 2 - Save any of the src/… files without making changes and the dist/js/app.js will disappear.
Note: I’ve tested with laravel-mix 0.8.* as I had that version in another project and the problem doesn’t occur, then I $ rm -rf node_modules && npm install laravel-mix -S and installed the latest version and the problem began to happen.
Note 2: The problem only occurs in $ npm run watch, $ npm run dev doesn’t delete it.
Note 3: I’ve not tested with a Laravel project, but I’m afraid it shouldn’t make a difference.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
Fixed in 1.0.
Same issue for me - will downgrade and wait for stable 😃