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.
39 lines
744 B
39 lines
744 B
const { defineConfig } = require('@vue/cli-service') |
|
|
|
const path = require('path'); |
|
const { name } = require('./package'); |
|
|
|
function resolve(dir) { |
|
return path.join(__dirname, dir); |
|
} |
|
|
|
const port = 7101; // dev port |
|
|
|
module.exports = defineConfig({ |
|
outputDir: 'dist', |
|
assetsDir: 'static', |
|
filenameHashing: true, |
|
|
|
transpileDependencies: true, |
|
devServer: { |
|
// host: '0.0.0.0', |
|
hot: true, |
|
port, |
|
headers: { |
|
'Access-Control-Allow-Origin': '*', |
|
}, |
|
}, |
|
// 自定义webpack配置 |
|
configureWebpack: { |
|
resolve: { |
|
alias: { |
|
'@': resolve('src'), |
|
}, |
|
}, |
|
output: { |
|
// 把子应用打包成 umd 库格式 |
|
library: `${name}-[name]`, |
|
libraryTarget: 'umd' |
|
}, |
|
}, |
|
})
|
|
|