iceshrimp-161sh/webpack/module/rules/theme-color.ts

26 lines
463 B
TypeScript
Raw Normal View History

2017-05-16 17:00:56 +02:00
/**
* Theme color provider
*/
const constants = require('../../../src/const.json');
export default () => ({
enforce: 'pre',
2018-02-10 06:56:33 +01:00
test: /\.vue$/,
2017-05-16 17:00:56 +02:00
exclude: /node_modules/,
2018-02-15 11:59:07 +01:00
use: [/*{
loader: 'replace-string-loader',
options: {
search: /\$theme\-color\-foreground/g,
replace: constants.themeColorForeground
}
}, */{
loader: 'replace-string-loader',
options: {
search: '$theme-color',
replace: constants.themeColor,
flags: 'g'
}
}]
2017-05-16 17:00:56 +02:00
});