josegus's avatar

mix-manifest loses hash after copying

I'm building a simple spa with vue and laravel, developed as a laravel package, similar to horizon or telescope. I'm following the same folder structure as horizon and telescope, copying the compiled assets with laravel-mix after run "npm run dev" or "npm run prod", from mypackage/public to mypackage-test/public/vendor/mypackage.

The problem is the same here in this issue https://github.com/JeffreyWay/laravel-mix/issues/1762

I'm using:

  • laravel 7 (application to test my package)
  • laravel mix 5.0
  • node v12.16
  • npm 6.13.4
  • ubuntu 19

My mix file:

mix.options({
    terser: {
        extractComments: false,
        terserOptions: {
            compress: {
                drop_console: true,
            },
        },
    },
}).setPublicPath('public')
    .js('resources/js/app.js', 'public')
    .sass('resources/sass/app.scss', 'public')
    .version([
        'public/assets/datatables/datatables.min.js',
        'public/assets/datatables/datatables.min.css',
    ])
    .copy('public', '../laravel-dash-test/public/vendor/dash');

The generated manifest: generated

The copied manifest: copied

Edit:

just made a clone of laravel telescope, executed npm run dev and guess what happens? The copied manifest has no hash.

0 likes
2 replies
josegus's avatar

read again please, my problem is not related to how publish assets

Please or to participate in this conversation.