1 Star 0 Fork 298

zhh / spider-flow-vue

forked from ssssssss-team / spider-flow-vue 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 2.00 KB
一键复制 编辑 原始数据 按行查看 历史
超级小富翁 提交于 2020-07-19 20:49 . 1、修复菜单显示bug
const path = require('path')
const resolve = dir => {
return path.join(__dirname, dir)
}
// 项目部署基础
// 默认情况下,我们假设你的应用将被部署在域的根目录下,
// 例如:https://www.my-app.com/
// 默认:'/'
// 如果您的应用程序部署在子路径中,则需要在这指定子路径
// 例如:https://www.foobar.com/my-app/
// 需要将它改为'/my-app/'
const BASE_URL = process.env.NODE_ENV === 'production' ? '/' : '/'
// monaco插件
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
module.exports = {
// Project deployment base
// By default we assume your app will be deployed at the root of a domain,
// e.g. https://www.my-app.com/
// If your app is deployed at a sub-path, you will need to specify that
// sub-path here. For example, if your app is deployed at
// https://www.foobar.com/my-app/
// then change this to '/my-app/'
publicPath: BASE_URL,
// tweak internal webpack configuration.
// see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
// 如果你不需要使用eslint,把lintOnSave设为false即可
lintOnSave: true,
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src')) // key,value自行定义,比如.set('@@', resolve('src/components'))
.set('public', resolve('public'))
// 移除 prefetch 插件
config.plugins.delete('prefetch')
// 移除 preload 插件
config.plugins.delete('preload')
config.output.filename('js/[name].[hash].js').end()
},
// 设为false打包时不生成.map文件
productionSourceMap: false,
// 这里写你调用接口的基础路径,来解决跨域,如果设置了代理,那你本地开发环境的axios的baseUrl要写为 '' ,即空字符串
devServer: {
port: 3000,
public: 'localhost:3000',
proxy: {
'/': {
target: 'http://localhost:8088',
ws: false,
changeOrigin: true
},
}
},
configureWebpack: {
plugins: [
new MonacoWebpackPlugin()
]
}
}
JavaScript
1
https://gitee.com/zhh_nice/spider-flow-vue.git
git@gitee.com:zhh_nice/spider-flow-vue.git
zhh_nice
spider-flow-vue
spider-flow-vue
master

搜索帮助