-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
27 lines (27 loc) · 1.17 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
const { defineConfig } = require('@vue/cli-service')
const { ProvidePlugin } = require("webpack");
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: true,
configureWebpack: (config) => {
config.devtool = "source-map";
config.resolve.symlinks = false;
config.resolve.fallback = {
crypto: "crypto-browserify", // crypto-browserify can be polyfilled here if needed
stream: false, // stream-browserify can be polyfilled here if needed
assert: "assert", // assert can be polyfilled here if needed
os: false, // os-browserify can be polyfilled here if needed
https: false, // https-browserify can be polyfilled here if needed
http: false, // stream-http can be polyfilled here if needed
url: "url", // url is needed if using `signer.provider.send` method for signing from ethers.js
zlib: false, // browserify-zlib can be polyfilled here if needed
};
config.plugins.push(new ProvidePlugin({ Buffer: ["buffer", "Buffer"] }));
config.plugins.push(
new BundleAnalyzerPlugin({
analyzerMode: "disabled",
})
);
},
})