Rendering tests / add custom web worker loader
Also includes a change in the rollup-babel plugin to avoid adding helpers as dependencies (which would give out errors).
This commit is contained in:
@@ -22,5 +22,16 @@ module.exports = {
|
|||||||
context: __dirname,
|
context: __dirname,
|
||||||
target: 'web',
|
target: 'web',
|
||||||
entry: entry,
|
entry: entry,
|
||||||
devtool: 'source-map'
|
devtool: 'source-map',
|
||||||
|
module: {
|
||||||
|
rules: [{
|
||||||
|
test: /\.js$/,
|
||||||
|
use: {
|
||||||
|
loader: path.join(__dirname, '../examples/webpack/worker-loader.js')
|
||||||
|
},
|
||||||
|
include: [
|
||||||
|
path.join(__dirname, '../src/ol/worker')
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ async function build(input, {minify = true} = {}) {
|
|||||||
common(),
|
common(),
|
||||||
resolve(),
|
resolve(),
|
||||||
babel({
|
babel({
|
||||||
|
'externalHelpers': true,
|
||||||
'presets': [
|
'presets': [
|
||||||
[
|
[
|
||||||
'@babel/preset-env',
|
'@babel/preset-env',
|
||||||
|
|||||||
Reference in New Issue
Block a user