Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watching less also cleans js directory #843

Closed
benplum opened this issue May 31, 2017 · 4 comments
Closed

Watching less also cleans js directory #843

benplum opened this issue May 31, 2017 · 4 comments

Comments

@benplum
Copy link

benplum commented May 31, 2017

  • Laravel Mix Version: 0.12.1
  • Node Version (node -v): 8.0.0
  • NPM Version (npm -v): 5.0.0
  • OS: OSX

Description:

If a less file is saved during a watch run, js files are not re-compiled and simply removed leading to 404s in the browser. I'm also noticing the 'Chunk names' for my js and css are the same, despite the css being output to a different directory:

Asset Size Chunks Chunk Names
public/js/app.js 1.76 MB 0 [emitted] [big] public/js/app
public/js/vendor.js 895 kB 1 [emitted] [big] public/js/vendor
public/js/manifest.js 5.83 kB 2 [emitted] public/js/manifest
public/css/app.css 154 kB 0 [emitted] public/js/app
mix-manifest.json 272 bytes [emitted]

Here's my webpack.mix.js:

const { mix } = require('laravel-mix');

mix.options({
  processCssUrls: false
});

mix.js('assets/js/app.js', 'public/js/app.js')
   .extract(['vue', 'lodash', 'axios'], 'public/js/vendor.js');

mix.less('assets/less/app.less', 'public/css/app.css');
@benplum
Copy link
Author

benplum commented May 31, 2017

Rolling back to 0.11.4 keeps the files in tact when watching.

@kevin-coyle
Copy link

We must have raised this at the exact same time! Relates to #844

@drehimself
Copy link

Same issue with sass/scss. Rolling back to 0.11.4 does indeed work.

@JeffreyWay
Copy link
Collaborator

Mix 1.0 automatically fixes this. Will be tagged later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants