developit / developit/workerize-loader
Fails when a depedency (module) requires a webpack "external" module
- 主要语言
- JavaScript
- 星标
- 2.3k
- 派生
- 85
- PR 合并指标
- 30 天内没有已合并 PR
描述
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
```
贡献指南
这个仓库没有索引到贡献指南
调研方向
Start by reproducing the webpack build using the shown externals configuration and the MyWorker.ts import. Trace how workerize-loader handles dependencies marked as webpack externals; done means the worker module compiles while resolving the external config module.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, typescript, webpack
- 领域
- build-system, tooling
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100