Use worker for GeoTIFF decoding

This commit is contained in:
Andreas Hocevar
2021-07-29 09:05:55 +02:00
parent 311247265b
commit 05eac3e384
5 changed files with 47 additions and 41 deletions

View File

@@ -9,7 +9,12 @@ module.exports = function loader() {
build(this.resource, {minify})
.then((chunk) => {
for (const filePath in chunk.modules) {
this.addDependency(filePath);
try {
const dependency = require.resolve(filePath);
this.addDependency(dependency);
} catch (e) {
// empty catch block
}
}
callback(null, chunk.code);
})