-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
58 lines (56 loc) · 1.43 KB
/
webpack.config.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
const webpack = require("webpack")
const path = require("path")
const config = {}
config.webtests = {
name: "web-tests",
// entry: "./test/e2e/artbycity.e2e.ts",
// entry: "./test/e2e/curation.e2e.ts",
// entry: "./test/e2e/usernames.e2e.ts",
entry: "./test/e2e/publications.e2e.ts",
mode: "development",
target: "web",
module: {
rules: [
{
test: /\.ts?$/,
use: "ts-loader",
},
],
},
resolve: {
extensions: [".tsx", ".ts", ".js"],
alias: {
// process: "process/browser",
// "@crypto/node-driver": path.resolve(
// __dirname,
// "./web/lib/crypto/webcrypto-driver"
// ),
},
fallback: {
// process: require.resolve("process/browser"),
// crypto: require.resolve("crypto-browserify"),
stream: require.resolve("stream-browserify"),
zlib: require.resolve('browserify-zlib'),
path: require.resolve('path-browserify')
},
},
plugins: [
new webpack.IgnorePlugin({ resourceRegExp: /mocha/ }),
new webpack.ProvidePlugin({
// process: "process/browser",
crypto: "crypto-browserify",
stream: "stream-browserify",
zlib: 'browserify-zlib',
path: 'path-browserify'
}),
],
devtool: "inline-source-map",
devServer: {
contentBase: "./dist",
},
output: {
filename: "webtests.bundle.js",
path: path.resolve(__dirname, "bundles"),
},
}
module.exports = [config.webtests]