UNPKG

test-mitid-integrator

Version:

Utility for handling communication with MitID broker via client-side JavaScript

35 lines (34 loc) 840 B
const path = require("path"); const TerserPlugin = require("terser-webpack-plugin"); module.exports = (env, options) => { return { mode: options.mode, entry: "./src/index.ts", output: { filename: "index.js", path: path.resolve(__dirname, "dist"), libraryTarget: "umd", library: "MitIDIntegrator", globalObject: 'this', umdNamedDefine: true }, resolve: { extensions: ['.ts', '.js'], }, module: { rules: [ { test: /\.m?(j|t)sx?$/, // Updated to include .ts and .tsx files exclude: /(node_modules|bower_components)/, use: { loader: 'ts-loader', }, }, ], }, optimization: { minimize: true, minimizer: [new TerserPlugin()], }, }; };