mirror of
https://github.com/koel/koel
synced 2025-02-17 13:58:28 +00:00
Use webpack codesplitting
This commit is contained in:
parent
1497450768
commit
f825892fb2
2 changed files with 12 additions and 2 deletions
|
@ -1 +1 @@
|
|||
Subproject commit e37456be80bc886345e93e07ce8d6012499ff976
|
||||
Subproject commit e4394f89fc29efc6b2a5eed29fc79ff657058da1
|
|
@ -2,10 +2,20 @@ const mix = require('laravel-mix')
|
|||
const fs = require('fs')
|
||||
const { externals, resolve, plugins } = require('./webpack.config.js')
|
||||
|
||||
mix.webpackConfig({ externals, resolve, plugins })
|
||||
mix.webpackConfig({
|
||||
externals,
|
||||
resolve,
|
||||
plugins,
|
||||
output: {
|
||||
chunkFilename: mix.config.inProduction ? 'js/[name].[chunkhash].js' : 'js/[name].js',
|
||||
publicPath: '/public/'
|
||||
}
|
||||
})
|
||||
|
||||
mix.setResourceRoot('./public/')
|
||||
|
||||
mix.config.detectHotReloading()
|
||||
|
||||
if (mix.config.hmr) {
|
||||
// There's a bug with Mix/copy plugin which prevents HMR from working:
|
||||
// https://github.com/JeffreyWay/laravel-mix/issues/150
|
||||
|
|
Loading…
Add table
Reference in a new issue