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
This commit is contained in:
Dmitry Poddubniy 2016-12-16 00:29:59 +02:00 committed by Arunoda Susiripala
parent ab14770318
commit 45e36fdff7
2 changed files with 1 additions and 2 deletions

View file

@ -45,7 +45,7 @@ export default async function createCompiler (dir, { hotReload = false, dev = fa
new webpack.optimize.CommonsChunkPlugin({
name: 'commons',
filename: 'commons.js',
minChunks: pages.length
minChunks: Math.max(2, pages.length)
})
]

View file

@ -54,7 +54,6 @@ export default class Server {
const p = join(__dirname, '..', 'client', ...(params.path || []))
await this.serveStatic(req, res, p)
})
this.router.get('/static/:path+', async (req, res, params) => {
const p = join(this.dir, 'static', ...(params.path || []))
await this.serveStatic(req, res, p)