心衰系统,crf表单
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.

77 lines
1.9 KiB

3 years ago
/**
* 配置参考: https://cli.vuejs.org/zh/config/
*/
'use strict'
const path = require('path')
// const defaultSettings = require('./src/settings.js')
const CopyPlugin = require('copy-webpack-plugin')
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
publicPath: '/', // 多页面情况 process.env.NODE_ENV === 'production' ? './' : '/',
assetsDir: 'static',
chainWebpack: config => {
const svgRule = config.module.rule('svg')
svgRule.uses.clear()
svgRule
.test(/\.svg$/)
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
},
// 默认打开eslint效验,如果需要关闭,设置成false即可
lintOnSave: false,
runtimeCompiler: true,
productionSourceMap: false,
devServer: {
open: true,
hot: true,
port: 8003,
host: '127.0.0.1',
overlay: {
errors: true,
warnings: true
}
// proxy: { // 配置跨域
// '/huimu-admin': {
// target: 'http://192.168.3.107:8081/huimu-admin', // 这里后台的地址模拟的;应该填写真实的后台接口
// changOrigin: true // 允许跨域
// }
// }
},
configureWebpack: {
resolve: {
alias: {
'vue': 'vue/dist/vue.esm.js',
'@': resolve('src'),
'@static': path.resolve(__dirname, 'static')
}
},
plugins: [
// new CopyPlugin([
// { from: path.resolve(__dirname, './static'), to: 'static' }
// ])
new CopyPlugin({ patterns: [
{ from: path.resolve(__dirname, 'static'), to: 'static' }
] })
]
},
pages: {
index: {
template: 'public/index.html',
entry: 'src/page-subspecialty/main.js',
filename: 'index.html',
title: 'index'
}
// project: {
// template: 'public/project.html',
// entry: 'src/page-project/main.js',
// filename: 'project.html',
// title: 'project'
// }
}
}