js + sass + copy = watch/compile loop
See original GitHub issueHi
It seems that using mix.js() + mix.sass() + mix.copy()
causes npm run watch
to keep compiling.
Here’s the code I’m using:
mix
.js('./resources/assets/js/nebula.js', './js')
.sass('./resources/assets/sass/nebula.scss', './css')
.copy('./js/nebula.js', '../../../public/vendor/nebula.js')
.copy('./css/nebula.css', '../../../public/vendor/nebula.css')
I’m running mix inside a packages/vendor/name folder, so not in the project’s route.
When I run npm run watch
my console gets crazy and the only things I can see are
WAIT: compiling...
WAIT: Compiled successfully in Nms
WAIT: compiling...
WAIT: Compiled successfully in Nms
WAIT: compiling...
WAIT: Compiled successfully in Nms
WAIT: compiling...
WAIT: Compiled successfully in Nms
and so on.
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (3 by maintainers)
Top Results From Across the Web
js + sass + copy = watch/compile loop · Issue #329 - GitHub
Hi It seems that using mix.js() + mix.sass() + mix.copy() causes npm run watch to keep compiling. Here's the code I'm using: mix...
Read more >Webpack 4. Compile scss to separate css file - Stack Overflow
Im trying to compile scss into a separate css file with no luck. As it is now the css gets into the bundle.js...
Read more >The easiest way to watch and Compile Sass in 5 Steps
To compile Sass via the command line first, we need to install node.js. The easiest way is downloading it from the official website ......
Read more >Sass: @for
Each number along the way is assigned to the given variable name. If to is used, the final number is excluded; if through...
Read more >How to compile Sass files in Visual Studio and Webpack
Open this new Sass file and copy the following: ... empty JavaScript file under the root of the application and name it webpack.config.js...
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
I am also seeing this issue on a brand new install of Laravel 5.4 but without even running the
copy
command. My mix file is really simple:I have commented out both parts in turn and it’s the
processCssUrls
part of thesass
script that causes the loop. If I comment out thebackground
definition here:Then it compiles with no issues. Also if I change the mix file to:
It compiles with no issues.
@ruchern I don’t think it’s that in my case.
This is my webpack.mix.js