skeith22's avatar

Laravel Mix v6 doesn't compile the files properly.

the files should be on their respective folders but the files of the players are in the admins folder.

and the chunks can't be loaded properly too.

I have this config on my webpack.mix.js

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

mix.js('resources/js/admins/app.js', 'public/js/admins')
    .js('resources/js/players/app.js', 'public/js/players')
    .sass('resources/sass/app.scss', 'public/css')
    .vue()
    .extract(['vue'])
    .sourceMaps();

if (mix.inProduction()) {
    mix.version();
}

mix.disableNotifications();

the result is like this in the public folder


js/admins/app.js
js/admins/manifest.js
js/admins/vendor.js
js/admins    // admins and players chunked files are in this folder

js/players/app.js
js/players/manifest.js
js/players/vendor.js

mix-manifest.json

{
    "/js/admins/app.js": "/js/admins/app.js",
    "/js/players/app.js": "/js/players/app.js",
    "/js/players/manifest.js": "/js/players/manifest.js",
    "/css/app.css": "/css/app.css",
    "/js/players/vendor.js": "/js/players/vendor.js"
}

MISSING reference on the mix-manifest.json file

"/js/admins/manifest.js": "/js/admins/manifest.js"

"/js/admins/vendor.js": "/js/admins/vendor.js"

0 likes
0 replies

Please or to participate in this conversation.