-
-
Notifications
You must be signed in to change notification settings - Fork 2k
/
webpack.config.js
41 lines (39 loc) · 1.01 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const path = require("path");
const { ProvidePlugin, DefinePlugin } = require("webpack");
module.exports = {
entry: path.join(path.resolve(__dirname, "lib"), "index.js"),
output: {
library: "JSEncrypt",
libraryTarget: "umd",
libraryExport: "default",
globalObject: "window",
path: path.resolve(__dirname, "bin"),
filename: "jsencrypt.js",
},
mode: "development",
performance: { hints: false },
module: {
rules: [
{
test: /\.m?js/,
type: "javascript/auto",
},
{
test: /\.m?js/,
resolve: {
fullySpecified: false,
},
},
],
},
plugins: [
new ProvidePlugin({
process: "process/browser",
}),
new DefinePlugin({
"process.env.npm_package_version": JSON.stringify(
process.env.npm_package_version,
),
}),
],
};