Adjust webpack configs for webpack v5
This commit is contained in:
parent
5fc6066e91
commit
d09fc0b60e
@ -1,5 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
const glob = require("glob");
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
|
||||
const target = "web";
|
||||
const distdir = path.join(__dirname, "dist", "web");
|
||||
@ -13,6 +15,11 @@ module.exports = [
|
||||
path: distdir,
|
||||
filename: "tests.js",
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
fallback: {
|
||||
crypto: require.resolve("crypto-browserify"),
|
||||
|
||||
@ -22,6 +22,9 @@ module.exports = [
|
||||
CW3_ENABLED: "",
|
||||
CW1_ENABLED: "",
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
fallback: {
|
||||
|
||||
@ -22,6 +22,9 @@ module.exports = [
|
||||
CW3_ENABLED: "",
|
||||
CW1_ENABLED: "",
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
fallback: {
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
const glob = require("glob");
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
|
||||
const target = "web";
|
||||
const distdir = path.join(__dirname, "dist", "web");
|
||||
@ -13,6 +15,11 @@ module.exports = [
|
||||
path: distdir,
|
||||
filename: "tests.js",
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
fallback: {
|
||||
crypto: require.resolve("crypto-browserify"),
|
||||
|
||||
@ -15,7 +15,12 @@ module.exports = [
|
||||
path: distdir,
|
||||
filename: "tests.js",
|
||||
},
|
||||
plugins: [new webpack.EnvironmentPlugin({ LAUNCHPAD_ENABLED: "" })],
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin({ LAUNCHPAD_ENABLED: "" }),
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
fallback: {
|
||||
crypto: require.resolve("crypto-browserify"),
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
const glob = require("glob");
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
|
||||
const target = "web";
|
||||
const distdir = path.join(__dirname, "dist", "web");
|
||||
@ -13,5 +15,10 @@ module.exports = [
|
||||
path: distdir,
|
||||
filename: "tests.js",
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
const glob = require("glob");
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
|
||||
const target = "web";
|
||||
const distdir = path.join(__dirname, "dist", "web");
|
||||
@ -13,6 +15,11 @@ module.exports = [
|
||||
path: distdir,
|
||||
filename: "tests.js",
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
fallback: {
|
||||
crypto: require.resolve("crypto-browserify"),
|
||||
|
||||
@ -15,7 +15,10 @@ module.exports = [
|
||||
path: distdir,
|
||||
filename: "tests.js",
|
||||
},
|
||||
plugins: [new webpack.EnvironmentPlugin({ SOCKETSERVER_ENABLED: "" })],
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin({ SOCKETSERVER_ENABLED: "" }),
|
||||
new webpack.ProvidePlugin({ process: "process/browser" }),
|
||||
],
|
||||
resolve: {
|
||||
fallback: {
|
||||
assert: require.resolve("assert"),
|
||||
|
||||
@ -15,7 +15,13 @@ module.exports = [
|
||||
path: distdir,
|
||||
filename: "tests.js",
|
||||
},
|
||||
plugins: [new webpack.EnvironmentPlugin({ SIMAPP_ENABLED: "" })],
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin({ SIMAPP_ENABLED: "" }),
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
new webpack.ProvidePlugin({ process: "process/browser" }),
|
||||
],
|
||||
resolve: {
|
||||
fallback: {
|
||||
crypto: require.resolve("crypto-browserify"),
|
||||
|
||||
@ -15,7 +15,12 @@ module.exports = [
|
||||
path: distdir,
|
||||
filename: "tests.js",
|
||||
},
|
||||
plugins: [new webpack.EnvironmentPlugin({ TENDERMINT_ENABLED: "" })],
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin({ TENDERMINT_ENABLED: "" }),
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
fallback: {
|
||||
crypto: require.resolve("crypto-browserify"),
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
const glob = require("glob");
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
|
||||
const target = "web";
|
||||
const distdir = path.join(__dirname, "dist", "web");
|
||||
@ -13,5 +15,10 @@ module.exports = [
|
||||
path: distdir,
|
||||
filename: "tests.js",
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user