mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 20:49:06 +01:00
26 lines
508 B
TypeScript
26 lines
508 B
TypeScript
/**
|
|
* Theme color provider
|
|
*/
|
|
|
|
const StringReplacePlugin = require('string-replace-webpack-plugin');
|
|
|
|
const constants = require('../../../src/const.json');
|
|
|
|
export default () => ({
|
|
enforce: 'pre',
|
|
test: /\.vue$/,
|
|
exclude: /node_modules/,
|
|
loader: StringReplacePlugin.replace({
|
|
replacements: [
|
|
{
|
|
pattern: /\$theme\-color\-foreground/g,
|
|
replacement: () => constants.themeColorForeground
|
|
},
|
|
{
|
|
pattern: /\$theme\-color/g,
|
|
replacement: () => constants.themeColor
|
|
},
|
|
]
|
|
})
|
|
});
|