developit / developit/workerize-loader

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

Abierto
#22 3 comentarios 4 reacciones 0 asignados Ver en GitHub
help wanted question
Lenguaje dominante
JavaScript
Estrellas
2.3k
Forks
85
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.