summaryrefslogtreecommitdiff
path: root/vue.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'vue.config.js')
-rw-r--r--vue.config.js26
1 files changed, 14 insertions, 12 deletions
diff --git a/vue.config.js b/vue.config.js
index 53dc6141..ca8e9f08 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -58,22 +58,16 @@ module.exports = {
const hasCustomAppNav =
process.env.CUSTOM_APP_NAV === 'true' ? true : false;
- if (process.env.NODE_ENV === 'production') {
- config.plugins.push(
- new CompressionPlugin({
- deleteOriginalAssets: true
- })
- );
- }
-
if (envName !== undefined) {
if (hasCustomStore) {
- // If env has custom store, resolve store module in src/main.js
- config.resolve.alias['./store$'] = `./env/store/${envName}.js`;
+ // If env has custom store, resolve all store modules. Currently found
+ // in src/router/index.js src/store/api.js and src/main.js
+ config.resolve.alias['./store$'] = `@/env/store/${envName}.js`;
+ config.resolve.alias['../store$'] = `@/env/store/${envName}.js`;
}
if (hasCustomRouter) {
- // If env has custom router, resolve router module in src/main.js
- config.resolve.alias['./router$'] = `./env/router/${envName}.js`;
+ // If env has custom router, resolve routes in src/router/index.js
+ config.resolve.alias['./routes$'] = `@/env/router/${envName}.js`;
}
if (hasCustomAppNav) {
// If env has custom AppNavigation, resolve AppNavigationMixin module in src/components/AppNavigation/AppNavigation.vue
@@ -82,6 +76,14 @@ module.exports = {
] = `@/env/components/AppNavigation/${envName}.js`;
}
}
+
+ if (process.env.NODE_ENV === 'production') {
+ config.plugins.push(
+ new CompressionPlugin({
+ deleteOriginalAssets: true
+ })
+ );
+ }
},
chainWebpack: config => {
if (process.env.NODE_ENV === 'production') {