|
@@ -10,10 +10,12 @@ const name = process.env.VUE_APP_TITLE || 'SaaS协同平台' // 网页标题
|
|
|
|
|
|
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
|
|
|
|
|
-const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
|
|
+// const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
|
|
|
|
|
module.exports = defineConfig({
|
|
|
- transpileDependencies: true,
|
|
|
+ transpileDependencies: [ // 转换非es6语法插件
|
|
|
+ '@riophae/vue-treeselect'
|
|
|
+ ],
|
|
|
// 部署生产环境和开发环境下的URL。
|
|
|
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
|
|
// 例如 https://www.benyuntech.com/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.benyuntech.com/admin/,则设置 baseUrl 为 /admin/。
|
|
@@ -33,15 +35,16 @@ module.exports = defineConfig({
|
|
|
open: true,
|
|
|
proxy: {
|
|
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
|
|
- [process.env.VUE_APP_BASE_API]: {
|
|
|
+ // [process.env.VUE_APP_BASE_API]: {
|
|
|
+ '/prod-api':{
|
|
|
ws:false,
|
|
|
- // target: `http://192.168.1.251:8080`,
|
|
|
- target: `http://192.168.2.202:8080`,
|
|
|
+ target: `http://192.168.2.32`,
|
|
|
+ // target: `http://192.168.2.202:8080`,
|
|
|
// target: `http://192.168.1.134:8080`,
|
|
|
changeOrigin: true,
|
|
|
- pathRewrite: {
|
|
|
- ['^' + process.env.VUE_APP_BASE_API]: ''
|
|
|
- }
|
|
|
+ // pathRewrite: {
|
|
|
+ // ['^' + process.env.VUE_APP_BASE_API]: ''
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -59,9 +62,9 @@ module.exports = defineConfig({
|
|
|
'@': resolve('src')
|
|
|
}
|
|
|
},
|
|
|
- entry: {
|
|
|
- 'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js'
|
|
|
- },
|
|
|
+ // entry: {
|
|
|
+ // 'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js'
|
|
|
+ // },
|
|
|
plugins: [
|
|
|
// new CompressionPlugin({
|
|
|
// // cache: false, // 不启用文件缓存
|
|
@@ -71,10 +74,10 @@ module.exports = defineConfig({
|
|
|
// minRatio: 0.8 // 压缩率小于1才会压缩
|
|
|
// }),
|
|
|
new NodePolyfillPlugin(),
|
|
|
- new MonacoWebpackPlugin({
|
|
|
- languages: ["javascript","css","html","json","java"],
|
|
|
- features: ["coreCommands", "find", "format", "folding", 'smartSelect', 'snippets', 'suggest', 'hover']
|
|
|
- }),
|
|
|
+ // new MonacoWebpackPlugin({
|
|
|
+ // languages: ["javascript","css","html","json","java"],
|
|
|
+ // features: ["coreCommands", "find", "format", "folding", 'smartSelect', 'snippets', 'suggest', 'hover']
|
|
|
+ // }),
|
|
|
],
|
|
|
},
|
|
|
chainWebpack(config) {
|