mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-05 19:41:57 +08:00
22 lines
534 B
JavaScript
22 lines
534 B
JavaScript
// import webpack from 'webpack';
|
|
|
|
export default function createVueWebpackConfig({
|
|
config,
|
|
webpackConfig
|
|
}) {
|
|
webpackConfig.module
|
|
.rule('vue')
|
|
.test(/\.vue$/)
|
|
.use('vue-loader')
|
|
.loader(require.resolve('vue-loader'))
|
|
.options({
|
|
babelParserPlugins: ['jsx', 'classProperties', 'decorators-legacy'],
|
|
...(config.vueLoader || {})
|
|
})
|
|
.end();
|
|
|
|
webpackConfig
|
|
.plugin('vue-loader')
|
|
.use(require('vue-loader').VueLoaderPlugin);
|
|
}
|