diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-02-19 09:35:26 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-02-19 09:35:26 +0000 |
commit | 5526458b4bd4cbba9216793429036155e7b7ea0c (patch) | |
tree | bb5de3c3ef24c9fdd78ad7c6304b50c1d24a8eae | |
parent | 586816aece7cf3a96d0f4948d5dbf2a8e2a9a187 (diff) | |
parent | 5bb6124ce73379f708b10e7f4d6f98ed761ee3f6 (diff) | |
download | gitlab-ce-5526458b4bd4cbba9216793429036155e7b7ea0c.tar.gz |
Merge branch 'ee-webpack-backport' into 'master'
Backport webpack.config.js changes from EE
See merge request gitlab-org/gitlab-ce!17185
-rw-r--r-- | config/webpack.config.js | 4 |
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; } |