summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-02-16 17:20:28 +0000
committerPhil Hughes <me@iamphill.com>2018-02-16 17:50:33 +0000
commit5bb6124ce73379f708b10e7f4d6f98ed761ee3f6 (patch)
tree8a0a05eddb01af088ec9ca500bf01b65f0850dab
parent71ba3982636d19b6c8208180ff5626a405cc23fc (diff)
downloadgitlab-ce-5bb6124ce73379f708b10e7f4d6f98ed761ee3f6.tar.gz
Backport webpack.config.js changes from EEee-webpack-backport
-rw-r--r--config/webpack.config.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 5ec33533b4f..f81f7067258 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -27,11 +27,11 @@ var pageEntries = glob.sync('pages/**/index.js', { cwd: path.join(ROOT_PATH, 'ap
// filter out entries currently imported dynamically in dispatcher.js
var dispatcher = fs.readFileSync(path.join(ROOT_PATH, 'app/assets/javascripts/dispatcher.js')).toString();
-var dispatcherChunks = dispatcher.match(/(?!import\('.\/)pages\/[^']+/g);
+var dispatcherChunks = dispatcher.match(/(?!import\(')\.\/pages\/[^']+/g);
pageEntries.forEach(( path ) => {
let chunkPath = path.replace(/\/index\.js$/, '');
- if (!dispatcherChunks.includes(chunkPath)) {
+ if (!dispatcherChunks.includes('./' + chunkPath)) {
let chunkName = chunkPath.replace(/\//g, '.');
autoEntries[chunkName] = './' + path;
}