Laravel-mix: wrong paths in mix-manifest.json under windows10 and 95% emitting

Created on 12 Jul 2017  路  2Comments  路  Source: JeffreyWay/laravel-mix

  • Laravel Mix Version: 1.2 (npm list --depth=0)
  • Node Version : v8.1.4
  • NPM Version (npm -v): 5.1.0
  • OS: Windows 10

Strange paths in the mix-manifest.json...

My webpack.mix.js


let { mix } = require('laravel-mix');
mix.js('js/app.js', 'dist/bundle.js')
.extract('jquery','uikit');
mix.sass('sass/theme-avec-uikit.scss', 'style.css');


gives that result in mix-manifest.json

{
"/C:/dist/bundle.js": "/C:/dist/bundle.js",
"/style.css": "/style.css",
"/uikit.js": "/uikit.js",
"/C:/dist/manifest.js": "/C:/dist/manifest.js"
}

Why this "/C:/" ?

the npm run watch gets stuck at 95 %

the npm run hot

@ hot C:\Users\nlb\Code\cmlespieux.local\app\public\wp-content\themes_satie
cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js

Project is running at http://localhost:8080/
webpack output is served from http://localhost:8080/
404s will fallback to /index.html
DONE Compiled successfully in 4914ms18:26:54

Thanks for your help.

Most helpful comment

Sorry for this dupplicated issue. The solution is given in #925

Indeed i do not use laravel but only laravel-mix
The solution is to add this line

mix.setPublicPath('./');

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

mix.setPublicPath('./');

mix.js('js/app.js', 'dist/bundle.js')
      .extract('jquery','uikit');

mix.sass('sass/theme-avec-uikit.scss', 'style.css');

All 2 comments

Duplicated: #925

Sorry for this dupplicated issue. The solution is given in #925

Indeed i do not use laravel but only laravel-mix
The solution is to add this line

mix.setPublicPath('./');

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

mix.setPublicPath('./');

mix.js('js/app.js', 'dist/bundle.js')
      .extract('jquery','uikit');

mix.sass('sass/theme-avec-uikit.scss', 'style.css');

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jpriceonline picture jpriceonline  路  3Comments

sdebacker picture sdebacker  路  3Comments

amin101 picture amin101  路  3Comments

stefensuhat picture stefensuhat  路  3Comments

wendt88 picture wendt88  路  3Comments