1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-17 16:18:23 +09:00
MisskeyIO/webpack/module/rules/vue.ts
2018-02-15 23:07:23 +09:00

32 lines
534 B
TypeScript

/**
* Vue
*/
const constants = require('../../../src/const.json');
export default () => ({
test: /\.vue$/,
exclude: /node_modules/,
use: [{
loader: 'vue-loader',
options: {
cssSourceMap: false,
preserveWhitespace: false
}
}, {
loader: 'webpack-replace-loader',
options: {
search: '$theme-color',
replace: constants.themeColor,
attr: 'g'
}
}, {
loader: 'webpack-replace-loader',
query: {
search: '$theme-color-foreground',
replace: constants.themeColorForeground,
attr: 'g'
}
}]
});