diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2018-02-26 20:03:21 -0600 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2018-02-26 20:03:21 -0600 |
commit | 9167989f3e9a8e5ee4c84600102e67d5799a9feb (patch) | |
tree | d311a7b9cbece59dc87e34fb9a83a2e1a9b837fd /config | |
parent | 2400c7bf4c3f69c46ce9c40b3c5c547b2e590dc5 (diff) | |
parent | b53256559fbb8cc078cc16754e9bf34dbee09746 (diff) | |
download | gitlab-ce-9167989f3e9a8e5ee4c84600102e67d5799a9feb.tar.gz |
Merge branch 'master' into refactor-commit-show
Diffstat (limited to 'config')
-rw-r--r-- | config/webpack.config.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index d0b17154978..172184128a9 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -25,16 +25,10 @@ var NO_COMPRESSION = process.env.NO_COMPRESSION; var autoEntries = {}; var pageEntries = glob.sync('pages/**/index.js', { cwd: path.join(ROOT_PATH, 'app/assets/javascripts') }); -// 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); - function generateAutoEntries(path, prefix = '.') { const chunkPath = path.replace(/\/index\.js$/, ''); - if (!dispatcherChunks.includes(`${prefix}/${chunkPath}`)) { - const chunkName = chunkPath.replace(/\//g, '.'); - autoEntries[chunkName] = `${prefix}/${path}`; - } + const chunkName = chunkPath.replace(/\//g, '.'); + autoEntries[chunkName] = `${prefix}/${path}`; } pageEntries.forEach(( path ) => generateAutoEntries(path)); @@ -307,6 +301,7 @@ var config = { 'images': path.join(ROOT_PATH, 'app/assets/images'), 'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'), 'vue$': 'vue/dist/vue.esm.js', + 'spec': path.join(ROOT_PATH, 'spec/javascripts'), } } } |