pow_sha256-polyfill/webpack.config.js

37 lines
711 B
JavaScript
Raw Normal View History

2021-12-08 14:28:38 +05:30
("use strict");
const path = require("path");
2021-06-27 21:31:09 +05:30
2021-12-08 14:28:38 +05:30
const dist = path.resolve(__dirname, "dist");
2021-06-27 21:31:09 +05:30
module.exports = {
//devtool: 'inline-source-map',
//mode: 'development',
2021-12-08 14:28:38 +05:30
mode: "production",
entry: "./src/",
2021-06-27 21:31:09 +05:30
output: {
path: dist,
2021-12-08 14:28:38 +05:30
libraryTarget: "umd",
filename: "index.js",
library: "pow256-polyfill",
2021-06-27 21:31:09 +05:30
},
module: {
rules: [
{
2021-12-08 14:28:38 +05:30
test: /\.ts$/,
loader: "ts-loader",
2021-06-27 21:31:09 +05:30
},
],
},
resolve: {
2021-12-08 14:28:38 +05:30
extensions: [".ts", ".tsx", ".js"],
2021-06-27 21:31:09 +05:30
},
plugins: [],
optimization: {
minimizer: [
// For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line
2021-12-08 14:28:38 +05:30
"...",
2021-06-27 21:31:09 +05:30
],
},
};