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.
54 lines
1.8 KiB
54 lines
1.8 KiB
const path = require('path')
|
|
const resolve = dir => {
|
|
return path.join(__dirname, dir)
|
|
}
|
|
// const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
module.exports = {
|
|
// open: true,
|
|
publicPath: './',
|
|
lintOnSave: false,
|
|
chainWebpack: config => {
|
|
config.resolve.alias
|
|
.set('_c', resolve('src/components')) // key,value自行定义,比如.set('@@', resolve('src/components'))
|
|
const rootModulesPath = path.resolve('node_modules');
|
|
if (config.resolve.modules.store.has(rootModulesPath)) {
|
|
config.resolve.modules.store.delete(rootModulesPath);
|
|
}
|
|
if (config.resolve.modules.store.has('node_modules')) {
|
|
config.resolve.modules.store.delete('node_modules');
|
|
}
|
|
config.resolve.modules.store.add(rootModulesPath);
|
|
config.resolve.modules.store.add('node_modules');
|
|
},
|
|
configureWebpack:config=>{
|
|
config.devtool = false
|
|
},
|
|
productionSourceMap:false
|
|
// configureWebpack: {
|
|
// plugins: [
|
|
// new CopyWebpackPlugin([
|
|
// { from: 'node_modules/@liveqing/liveplayer/dist/component/crossdomain.xml' },
|
|
// { from: 'node_modules/@liveqing/liveplayer/dist/component/liveplayer-lib.min.js', to: 'js/' },
|
|
// { from: 'node_modules/@liveqing/liveplayer/dist/component/liveplayer.swf' }
|
|
// ])
|
|
// ]
|
|
// }
|
|
// Proxy:{
|
|
// '/':{
|
|
// target:process.env.VUE_APP_BASE_API,
|
|
// changeOrigin:true,
|
|
// }
|
|
// }
|
|
// devServer: {
|
|
// proxy: {
|
|
// '/api': {
|
|
// target: 'http://10.97.121.2/api', //跨域请求的公共地址
|
|
// changeOrigin: true, //是否开启跨域,值为 true 就是开启, false 不开启
|
|
// // pathRewrite: {
|
|
// // '/api': './' //注册全局路径, 但是在你请求的时候前面需要加上 /api
|
|
// // }
|
|
// }
|
|
// },
|
|
// }
|
|
|
|
}
|