forked from hyperledger-archives/aries-framework-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.node.js
40 lines (34 loc) · 982 Bytes
/
webpack.config.node.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
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
const path = require("path")
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
const WebpackShellPlugin = require('webpack-shell-plugin')
const { PATHS } = require("./webpack.config.common.js")
const OUTPUT = path.join(PATHS.buildDir, "node/")
module.exports = {
entry: path.join(PATHS.srcDir, "aries.js"),
target: 'node',
output: {
path: OUTPUT,
publicPath: "dist/node/",
libraryTarget: 'umd',
filename: 'aries.js',
library: 'Aries'
},
plugins: [
new CleanWebpackPlugin(),
new WebpackShellPlugin({
onBuildStart: [
"mkdir -p " + OUTPUT,
"cp -p src/worker-impl-node.js dist/assets",
]
})
],
resolve: {
alias: {
worker_loader$: path.join(PATHS.srcDir, "worker-loader-node.js")
}
},
}