From 45e36fdff73e6732e1d536aa8c852648ff0ea002 Mon Sep 17 00:00:00 2001 From: Dmitry Poddubniy Date: Fri, 16 Dec 2016 00:29:59 +0200 Subject: [PATCH] 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 --- server/build/webpack.js | 2 +- server/index.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/server/build/webpack.js b/server/build/webpack.js index fbd51f73c9..aec0d7e0e6 100644 --- a/server/build/webpack.js +++ b/server/build/webpack.js @@ -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) }) ] diff --git a/server/index.js b/server/index.js index c3e5845532..3a97ebba16 100644 --- a/server/index.js +++ b/server/index.js @@ -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)