加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
jakeem 提交于 2023-07-22 16:04 . smart screen v1
const webpack = require('webpack');
module.exports = {
devServer: {
proxy: {
// '/socket.io': {
// target: 'http://127.0.0.1:16062',
// ws: true,
// changeOrigin: false
// }
}
},
configureWebpack: {
resolve: {
fallback: {path: require.resolve("path-browserify")},
fallback: {zlib: require.resolve("browserify-zlib")},
fallback: {stream: require.resolve("stream-browserify")},
fallback: {buffer: require.resolve("buffer")},
fallback: {os: require.resolve("os-browserify/browser")},
},
alias: {
crypto: false,
stream: false,
assert: false,
http: false,
https: false,
zlib: false,
os: false
},
plugins: [
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
new webpack.ProvidePlugin({
process: 'process/browser',
}),
]
},
configureWebpack: (config) => {
config.resolve.fallback = {
...config.resolve.fallback,
// Include here the "empty" modules
url: false,
util: false,
querystring: false,
https: false,
crypto: false,
stream: false,
assert: false,
http: false,
https: false,
zlib: false,
os: false
};
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化