summaryrefslogtreecommitdiff
path: root/vue.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'vue.config.js')
-rw-r--r--vue.config.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/vue.config.js b/vue.config.js
index de0ad12a..ff2de366 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,5 +1,7 @@
const CompressionPlugin = require('compression-webpack-plugin');
+const Fs = require('fs');
+
module.exports = {
css: {
loaderOptions: {
@@ -8,16 +10,22 @@ module.exports = {
const envName = process.env.VUE_APP_ENV_NAME;
const hasCustomStyles =
process.env.CUSTOM_STYLES === 'true' ? true : false;
+ var themeName;
if (hasCustomStyles && envName !== undefined) {
// If there is an env name defined, import Sass
// overrides.
// It is important that these imports stay in this
// order to make sure enviroment overrides
// take precedence over the default BMC styles
+ themeName = envName;
+ if( ! Fs.existsSync('./src/assets/styles/_obmc-' + envName + '.scss') ) {
+ themeName = "custom";
+ }
return `
@import "@/assets/styles/bmc/helpers";
@import "@/env/assets/styles/_${envName}";
@import "@/assets/styles/bootstrap/_helpers";
+ @import "@/assets/styles/_obmc-${themeName}";
`;
} else {
// Include helper imports so single file components
@@ -30,6 +38,7 @@ module.exports = {
return `
@import "@/assets/styles/bmc/helpers";
@import "@/assets/styles/bootstrap/_helpers";
+ @import "@/assets/styles/_obmc-custom";
`;
}
},