Laravel-mix: [1.4.2] Code splitting chunks location path is wrong when loaded in the browser

Created on 27 Jul 2017  路  4Comments  路  Source: JeffreyWay/laravel-mix

  • Laravel Mix Version: 1.4.2
  • Node Version: 6.11.1
  • NPM Version: 3.10.10
  • OS: Ubuntu 16.04

Description:

I'm using code splitting in vue, and when i run my app in the browser it doesn't find the appropriate chunk file because it doesn't use the absolute path (/js/0.js) but the relative path(js/0.js). It work when i add the publicPath: '/' to the webpackConfig.

Steps To Reproduce:

In the webpack.mix.js file add:

.webpackConfig({
  output: {
    chunkFilename: 'js/[name].[chunkhash].js'
  },
});

And in the app.js file:

Vue.component('some-component', () => import('./components/SomeComponent.vue'));

Import the app.js, manifest.js in the view and test it.

stale

Most helpful comment

This may not be related... for me the versioned chunks are put into the public folder when they should be in the public/js folder.

All 4 comments

This may not be related... for me the versioned chunks are put into the public folder when they should be in the public/js folder.

@micbenner Yes, experiencing the same thing. I have specified my output path as public/js in webpack.mix.js, but chunks are placed in public.

related #936

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jpriceonline picture jpriceonline  路  3Comments

Bomavi picture Bomavi  路  3Comments

stefensuhat picture stefensuhat  路  3Comments

mementoneli picture mementoneli  路  3Comments

mstralka picture mstralka  路  3Comments