andywer / andywer/threads.js

AngularWebpackPlugin needed?

未關閉
#344 0 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
3.5k
分支
173
PR 合併指標
30 天內沒有已合併 PR

描述

custom-webpack.config.js
```
const ThreadsPlugin = require('threads-plugin')

module.exports = {
plugins: [
new ThreadsPlugin()
]
}
```
tsconfig.json
```
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"module": "esnext",
"lib": [
"es2018",
"dom"
],
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
```
angular.json
```
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "./custom-webpack.config.js",
"replaceDuplicatePlugins": true
},

...
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",

```

When I run `ng serve` I get the following error
```
Error: ./src/app/sim/simulation-web-worker.worker.ts (./node_modules/threads-plugin/dist/loader.js?{"name":"0"}!./src/app/sim/simulation-web-worker.worker.ts)
Module build failed (from ./node_modules/threads-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: The Angular Webpack loader requires the AngularWebpackPlugin.
```

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。