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
```
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
首先,使用所示的 externals 設定和 MyWorker.ts 匯入來重現 webpack 建置。追蹤 workerize-loader 如何處理標記為 webpack externals 的相依項目;完成標準是 worker 模組能在解析外部設定模組的同時完成編譯。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, typescript, webpack
- 領域
- build-system, tooling
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100