diff options
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r-- | config/webpack.config.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index 9c7a3f42c97..f69a799ebcf 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -102,6 +102,7 @@ const alias = { if (IS_EE) { Object.assign(alias, { ee: path.join(ROOT_PATH, 'ee/app/assets/javascripts'), + ee_component: path.join(ROOT_PATH, 'ee/app/assets/javascripts'), ee_empty_states: path.join(ROOT_PATH, 'ee/app/views/shared/empty_states'), ee_icons: path.join(ROOT_PATH, 'ee/app/views/shared/icons'), ee_images: path.join(ROOT_PATH, 'ee/app/assets/images'), @@ -283,16 +284,13 @@ module.exports = { jQuery: 'jquery', }), - new webpack.NormalModuleReplacementPlugin(/^ee_component\/(.*)\.vue/, function(resource) { - if (Object.keys(module.exports.resolve.alias).indexOf('ee') >= 0) { - resource.request = resource.request.replace(/^ee_component/, 'ee'); - } else { + !IS_EE && + new webpack.NormalModuleReplacementPlugin(/^ee_component\/(.*)\.vue/, resource => { resource.request = path.join( ROOT_PATH, 'app/assets/javascripts/vue_shared/components/empty_component.js', ); - } - }), + }), new CopyWebpackPlugin([ { |