init
This commit is contained in:
17
.webpack/rules/loadWebWorkers.js
Normal file
17
.webpack/rules/loadWebWorkers.js
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* This allows us to include web workers in our bundle, and VTK.js
|
||||
* web workers in our bundle. While this increases bundle size, it
|
||||
* cuts down on the number of includes we need for `script tag` usage.
|
||||
*/
|
||||
const loadWebWorkers = {
|
||||
test: /\.worker\.js$/,
|
||||
include: /vtk\.js[\/\\]Sources/,
|
||||
use: [
|
||||
{
|
||||
loader: 'worker-loader',
|
||||
options: { inline: true, fallback: false },
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = loadWebWorkers;
|
||||
Reference in New Issue
Block a user