基于vue3.0和element-plus的组件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

42 lines
910 B

const path = require('path');
const { config } = require('process');
const resolve = (dir) => path.join(__dirname, dir);
module.exports = {
transpileDependencies: true,
devServer: {
proxy: {
'/api': {
target: process.env.VUE_APP_BASE_URL,
// 允许跨域
changeOrigin: true,
ws: true,
pathRewrite: {
'^/api': '',
},
},
},
},
pages: {
index: {
entry: 'examples/main.ts', // 入口文件
template: 'public/index.html',
filename: 'index.html',
},
},
chainWebpack: (config) => {
config.module
.rule('js')
.include.add(resolve('packages'))
.add(resolve('plugs'))
.end()
.use('babel') // 编译器
.loader('babel-loader')
.tap((option) => {
return option;
});
config.resolve.alias.set('noob-mengyxu', resolve('./index.ts'));
},
};