Re-add custom theme integration

This commit is contained in:
Ramon Wenger 2022-05-10 17:38:13 +02:00
parent d8f43a8af9
commit a3099b7d04
1 changed files with 12 additions and 6 deletions

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
const path = require('path'); const path = require('path');
const config = require('../config'); const config = require('../config');
var MiniCssExtractPlugin = require('mini-css-extract-plugin') var MiniCssExtractPlugin = require('mini-css-extract-plugin');
const {VueLoaderPlugin} = require('vue-loader'); const {VueLoaderPlugin} = require('vue-loader');
@ -40,8 +40,8 @@ module.exports = {
}, },
optimization: { optimization: {
splitChunks: { splitChunks: {
chunks: 'all' chunks: 'all',
} },
}, },
resolve: { resolve: {
extensions: ['.js', '.ts', '.vue', '.json', '.gql', '.graphql', '.scss'], extensions: ['.js', '.ts', '.vue', '.json', '.gql', '.graphql', '.scss'],
@ -123,9 +123,15 @@ module.exports = {
isDev ? 'vue-style-loader' : MiniCssExtractPlugin.loader, isDev ? 'vue-style-loader' : MiniCssExtractPlugin.loader,
'css-loader', 'css-loader',
'postcss-loader', 'postcss-loader',
'sass-loader' {
] loader: 'sass-loader',
} options: {
additionalData: process.env.THEME ? `@import "styles/themes/_${process.env.THEME}.scss";` : '',
sourceMap: isDev,
},
},
],
},
// styleRule(false), // css rule // styleRule(false), // css rule
// styleRule(true), // sass rule // styleRule(true), // sass rule
], ],