-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
21 lines (19 loc) · 537 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
21 lines (19 loc) · 537 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const path = require('path');
const entryPath = path.resolve(__dirname, "./src/index.js");
const outputPath = path.resolve(__dirname, "./lib");
module.exports = {
mode: 'production',
entry: entryPath,
target: 'node',
module: {
rules: [
{test: /\.json$/, use: "json-loader"},
{test: /\.jsx?$/, exclude: /(node_modules)/, use: ['babel-loader', 'eslint-loader']}
]
},
output: {
path: outputPath,
filename: "lib.min.js",
libraryTarget: 'umd'
}
};