This repository has been archived on 2023-04-09. You can view files and clone it, but cannot push or open issues or pull requests.
chainsafe-bls/webpack.config.cjs

30 lines
671 B
JavaScript

const ResolveTypeScriptPlugin = require("resolve-typescript-plugin");
module.exports = {
entry: "./src/index.ts",
mode: "production",
output: {
filename: "dist/bundle.js",
},
module: {
rules: [{test: /\.(ts)$/, use: {loader: "ts-loader", options: {transpileOnly: true}}}],
},
optimization: {
// Disable minification for better debugging on Karma tests
minimize: false,
//splitChunks: false, runtimeChunk: false,
},
devtool: "source-map",
resolve: {
plugins: [new ResolveTypeScriptPlugin()],
fallback: {
crypto: false,
fs: false,
path: false,
},
},
experiments: {
topLevelAwait: true,
},
};