developit / developit/workerize-loader

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

Aberta
#22 3 comentários 4 reações 0 responsáveis Ver no GitHub
help wanted question
Linguagem predominante
JavaScript
Estrelas
2.3k
Forks
85
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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
```

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.