forked from travist/jsencrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.test.js
41 lines (39 loc) · 1010 Bytes
/
webpack.test.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: "./test/test.rsa.js",
output: {
library: "JSEncrypt",
libraryTarget: "umd",
libraryExport: "default",
globalObject: "window",
path: path.resolve(__dirname, "test"),
filename: "test.rsa.bundle.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,
),
}),
],
};