developit / developit/workerize-loader

Fails when a depedency (module) requires a webpack "external" module

Aperta
#22 3 commenti 4 reazioni 0 assegnatari Vedi su GitHub
help wanted question
Lingua principale
JavaScript
Stelle
2.3k
Fork
85
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Awesome library! I've just found an edge case when workerizing a module that depends on a webpack external.

In my webpack config i have:
```javascript
module.exports = {
// ...
externals: {
'config': JSON.stringify(config),
},
// ...
}
```

and in my worker module I have:
```typescript
import * as config from 'config';
```

I'm using typescript in case that matters.

Here's the compilation error from webpack:
```bash
Module not found: Error: Can't resolve 'config' in '/directory/src'
@ ./src/MyWorker.ts 1:0-33
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.