andywer / andywer/threads.js

AngularWebpackPlugin needed?

Abierto
#344 0 comentarios 2 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
3.5k
Forks
173
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

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.