Skip to content

Commit 6e889d9

Browse files
committed
Update webpack cfg
1 parent 019743e commit 6e889d9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

webpack.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const path = require('path');
1+
const path = require('node:path');
22

33
module.exports = {
44
entry: './src/index.js',
@@ -7,7 +7,11 @@ module.exports = {
77
filename: 'browser.min.js',
88
path: path.resolve(__dirname, 'dist'),
99
library: 'emailValidator',
10-
libraryTarget: 'window'
10+
libraryTarget: 'umd',
11+
globalObject: 'this'
12+
},
13+
optimization: {
14+
minimize: true
1115
},
1216
devtool: 'source-map'
1317
};

0 commit comments

Comments
 (0)