2018-02-10 02:27:05 +01:00
|
|
|
/**
|
|
|
|
* Vue
|
|
|
|
*/
|
|
|
|
|
2018-02-15 15:07:19 +01:00
|
|
|
const constants = require('../../../src/const.json');
|
|
|
|
|
2018-02-10 02:27:05 +01:00
|
|
|
export default () => ({
|
|
|
|
test: /\.vue$/,
|
|
|
|
exclude: /node_modules/,
|
2018-02-15 15:07:19 +01:00
|
|
|
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'
|
|
|
|
}
|
|
|
|
}]
|
2018-02-10 02:27:05 +01:00
|
|
|
});
|