forked from openWB/openwb-ui-settings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
49 lines (48 loc) · 1.06 KB
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
const webpack = require("webpack");
module.exports = {
publicPath: "/openWB/web/settings/",
css: {
sourceMap: true,
},
devServer: {
webSocketServer: {
options: {
// change default path "/ws" to avoid collision
// with openWB websocket for mqtt
path: "/devserver",
},
},
proxy: {
"^/ws": {
target: "ws://localhost:9001",
ws: true,
},
},
},
configureWebpack: {
resolve: {
fallback: {
buffer: require.resolve("buffer/"),
process: require.resolve("process/browser"),
url: require.resolve("url/"),
crypto: require.resolve("crypto-browserify"),
stream: require.resolve("stream-browserify"),
},
},
plugins: [
new webpack.ProvidePlugin({
Buffer: ["buffer", "Buffer"],
process: "process/browser",
url: "url/",
}),
],
output: {
filename: process.env.VUE_CLI_MODERN_BUILD
? "js/[name]-esm.[contenthash:8].js"
: "js/[name].[contenthash:8].js",
chunkFilename: process.env.VUE_CLI_MODERN_BUILD
? "js/[name]-esm.[contenthash:8].js"
: "js/[name].[contenthash:8].js",
},
},
};