chore: 初始化 VPSA DJS TV 看板
This commit is contained in:
48
vue.config.js
Normal file
48
vue.config.js
Normal file
@@ -0,0 +1,48 @@
|
||||
module.exports = {
|
||||
publicPath: '/',
|
||||
devServer: {
|
||||
// host: '172.20.10.2',
|
||||
host: '127.0.0.1',
|
||||
// https: true,
|
||||
disableHostCheck: true,
|
||||
port: '8082',
|
||||
proxy: {
|
||||
'/mqtt': {
|
||||
target: 'ws://127.0.0.1:8083/mqtt',
|
||||
ws: true, // 如果要代理 websockets,配置这个参数
|
||||
secure: false, // 如果是https接口,需要配置这个参数
|
||||
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
|
||||
pathRewrite: {
|
||||
'^/mqtt': '' // 路径重写
|
||||
}
|
||||
},
|
||||
'/socket': {
|
||||
target: 'ws://192.168.1.188:8083/mqtt',
|
||||
ws: true, // 如果要代理 websockets,配置这个参数
|
||||
secure: false, // 如果是https接口,需要配置这个参数
|
||||
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
|
||||
pathRewrite: {
|
||||
'^/socket': '' // 路径重写
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
chainWebpack: config => {
|
||||
config.module
|
||||
.rule('special-transpile')
|
||||
.test(/\.js$/)
|
||||
.include
|
||||
.add(/node_modules[\\/](@ezuikit|ezuikit-js|screenfull)/)
|
||||
.add(/node_modules[\\/].*[\\/]screenfull[\\/]/)
|
||||
.end()
|
||||
.use('babel-loader')
|
||||
.loader('babel-loader')
|
||||
.options({
|
||||
presets: ['@babel/preset-env'],
|
||||
plugins: [
|
||||
'@babel/plugin-proposal-optional-chaining',
|
||||
'@babel/plugin-proposal-nullish-coalescing-operator'
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user