Skip to content

Commit 45e36fd

Browse files
mr47arunoda
authored andcommitted
fixed bug #362, also set chunks names (#363)
* fixed bug #362, also set chunks names * set simple solution for minChunks * revert in favor of #310
1 parent ab14770 commit 45e36fd

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

server/build/webpack.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default async function createCompiler (dir, { hotReload = false, dev = fa
4545
new webpack.optimize.CommonsChunkPlugin({
4646
name: 'commons',
4747
filename: 'commons.js',
48-
minChunks: pages.length
48+
minChunks: Math.max(2, pages.length)
4949
})
5050
]
5151

server/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export default class Server {
5454
const p = join(__dirname, '..', 'client', ...(params.path || []))
5555
await this.serveStatic(req, res, p)
5656
})
57-
5857
this.router.get('/static/:path+', async (req, res, params) => {
5958
const p = join(this.dir, 'static', ...(params.path || []))
6059
await this.serveStatic(req, res, p)

0 commit comments

Comments
 (0)