Commit 54f83c7b authored by Mike Greiling's avatar Mike Greiling

Merge branch 'winh-simplify-ee_component' into 'master'

Simplify ee_component resolution

See merge request gitlab-org/gitlab!21109
parents 075a4ae4 01a2bd4a
......@@ -31,7 +31,6 @@ rules:
- error
- allowElseIf: true
import/no-cycle: warn
import/no-unresolved: warn
import/no-useless-path-segments: off
import/order: warn
lines-between-class-members: off
......
......@@ -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([
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment