forked from hyperledger-archives/aries-framework-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.web.js
41 lines (35 loc) · 1.04 KB
/
webpack.config.web.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
/*
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, "web/")
module.exports = {
entry: path.join(PATHS.srcDir, "aries.js"),
target: 'web',
output: {
path: OUTPUT,
publicPath: "dist/web",
libraryTarget: "umd",
filename: 'aries.js',
// TODO fix client usage: currently have to call like this: Aries.Aries.<pkg>.<fn>
library: 'Aries'
},
plugins: [
new CleanWebpackPlugin(),
new WebpackShellPlugin({
onBuildStart: [
"mkdir -p " + OUTPUT,
"cp -p src/worker-impl-web.js dist/assets",
]
})
],
resolve: {
alias: {
worker_loader$: path.join(PATHS.srcDir, "worker-loader-web.js")
}
}
}