forked from visgl/loaders.gl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
34 lines (30 loc) · 877 Bytes
/
webpack.config.js
File metadata and controls
34 lines (30 loc) · 877 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
/* eslint-disable import/no-extraneous-dependencies */
const getWebpackConfig = require('ocular-dev-tools/config/webpack.config');
module.exports = (env = {}) => {
const config = getWebpackConfig(env);
config.module.rules.push({
// Load worker tests
test: /\.worker\.js$/,
use: {
loader: 'worker-loader'
}
});
// Uncomment to debug config
// console.error(JSON.stringify(config, null, 2));
return [
config,
// For worker tests
// Output bundles to root and can be loaded with `new Worker('/*.worker.js')`
{
mode: 'development',
entry: {
'json-loader': './modules/core/test/worker-utils/json-loader.worker.js',
'jsonl-loader': './modules/core/test/worker-utils/jsonl-loader.worker.js'
},
output: {
filename: '[name].worker.js'
},
target: 'webworker'
}
];
};