cosmjs/packages/tendermint-rpc/webpack.web.config.js

39 lines
842 B
JavaScript
Raw Permalink Normal View History

/* 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");
module.exports = [
{
// bundle used for Karma tests
target: target,
entry: glob.sync("./build/**/*.spec.js"),
output: {
path: distdir,
filename: "tests.js",
},
2021-05-20 13:37:43 +02:00
plugins: [
2022-04-12 17:58:01 +02:00
new webpack.EnvironmentPlugin({
HTTPSERVER_ENABLED: "",
TENDERMINT_ENABLED: "",
}),
2021-05-20 13:37:43 +02:00
new webpack.ProvidePlugin({
Buffer: ["buffer", "Buffer"],
}),
],
2021-04-14 17:35:53 +02:00
resolve: {
fallback: {
2021-05-19 17:46:21 +02:00
buffer: false,
crypto: false,
events: false,
path: false,
stream: false,
string_decoder: false,
2021-04-14 17:35:53 +02:00
},
},
},
];