-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathwebpack.unit.tests.config.js
More file actions
50 lines (48 loc) · 983 Bytes
/
webpack.unit.tests.config.js
File metadata and controls
50 lines (48 loc) · 983 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// This config is used to run tests in the browser.
const path = require('path');
module.exports = {
mode: 'production',
target: "web",
entry: './dist/tests/unit_tests.js',
output: {
path: path.resolve(__dirname, './dist'),
filename: 'browser_unit_tests.js',
libraryTarget: 'umd',
globalObject: 'this',
// libraryExport: 'default',
// library: 'loom_unit_tests'
},
node: {
fs: 'empty',
crypto: true,
util: true,
stream: true,
path: 'empty',
},
externals: {
shelljs: 'shelljs',
},
module: {
rules: [
{
test: /\.(js)$/,
exclude: /(node_modules)/,
loader: 'babel-loader',
options:
{
presets: [
['@babel/preset-env', { loose: true, modules: false }],
],
sourceType: 'unambiguous'
}
}
]
},
plugins: [
],
// silence irrelevant messages
performance: {
hints: false
},
stats: 'errors-only'
};