1 Star 2 Fork 0

忆飞/xinguan-vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1.64 KB
一键复制 编辑 原始数据 按行查看 历史
tangyufei 提交于 2021-05-03 15:18 . 面包屑和富文本编辑优化
let proxyObj = {}
proxyObj['/'] = {
ws: false,
//target:'http://yifei.free.idcfengye.com',
target: 'http://localhost:8989',
//启用代理
changeOrigin: true,
pathRewrite: {
'^/api': '/'
}
}
const path = require('path')
const webpack = require('webpack')
const resolve = dir => path.join(__dirname, dir)
module.exports = {
configureWebpack: {
plugins: [
new webpack.ProvidePlugin({
' window.Quill': 'quill/dist/quill.js',
'Quill': 'quill/dist/quill.js'
})
]
},
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
outputDir: 'dist',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
assetsDir: 'static',
//设置是否在开发环境下每次保存代码时都启用 eslint验证。
lintOnSave: false,
devServer: {
//允许非本地,内网,连接
disableHostCheck: true,
port: 8080,
proxy: proxyObj
},
chainWebpack: config => {
//quill富文本图片大小编辑
config.plugin('provide').use(webpack.ProvidePlugin, [{
'window.Quill': 'quill'
}])
//使用svg图标
config.module
.rule('svg')
.exclude.add(resolve('src/assets/icons'))
.end()
config.module
.rule('icons')
.test(/\.svg$/)
.include.add(resolve('src/assets/icons'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: 'icon-[name]'
})
.end()
},
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/memory-of-flying/xinguan-vue.git
git@gitee.com:memory-of-flying/xinguan-vue.git
memory-of-flying
xinguan-vue
xinguan-vue
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385