-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwebpack.config.node.js
More file actions
29 lines (28 loc) · 873 Bytes
/
webpack.config.node.js
File metadata and controls
29 lines (28 loc) · 873 Bytes
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
const path = require('path');
const webpack = require('webpack');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const nodeExternals = require('webpack-node-externals');
module.exports = {
entry: {
'aes-cbc': path.join(__dirname, '/examples/js/aes-cbc.js'),
'aes-cbc-2': path.join(__dirname, '/examples/js/aes-cbc-2.js'),
'ecdh': path.join(__dirname, '/examples/js/ecdh.js'),
'ecdsa': path.join(__dirname, '/examples/js/ecdsa.js'),
'rsa-oaep': path.join(__dirname, '/examples/js/rsa-oaep.js'),
'sha1': path.join(__dirname, '/examples/js/sha1.js')
},
plugins: [
new CleanWebpackPlugin(['dist/node']),
new webpack.DefinePlugin({
IS_BROWSER: false
})
],
output: {
path: path.resolve(__dirname, 'dist/node'),
filename: '[name].js'
},
target: 'node',
externals: [nodeExternals({
whitelist: ['adapters']
})]
};