Add theme dynamically via env var
This commit is contained in:
parent
54be107654
commit
9ca1cdaa4f
|
|
@ -100,7 +100,7 @@ module.exports = {
|
|||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
data: `@import "styles/themes/_whitelabel.scss";`
|
||||
data: process.env.THEME ? `@import "styles/themes/_${process.env.THEME}.scss";` : ''
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -14,13 +14,6 @@ const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
|||
const env = require('../config/prod.env')
|
||||
|
||||
const webpackConfig = merge(baseWebpackConfig, {
|
||||
module: {
|
||||
rules: utils.styleLoaders({
|
||||
sourceMap: config.build.productionSourceMap,
|
||||
extract: true,
|
||||
usePostCSS: true
|
||||
})
|
||||
},
|
||||
devtool: config.build.productionSourceMap ? config.build.devtool : false,
|
||||
output: {
|
||||
path: config.build.assetsRoot,
|
||||
|
|
|
|||
Loading…
Reference in New Issue