You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting error " Error: AngularCompilerPlugin is running in a child compilation, but couldnot find a WebpackCompilerHost in the parent compilation."
#3368
Open
jha-pankaj opened this issue
Oct 21, 2024
· 0 comments
In My project workbox-webpack-plugin is used.
It was working fine till angular 10. when i Migrated it to 11, i got error in "npm run build" command .
Error-
" Error: AngularCompilerPlugin is running in a child compilation, but couldnot find a WebpackCompilerHost in the parent compilation."
my workbook config file -
In My project workbox-webpack-plugin is used.
It was working fine till angular 10. when i Migrated it to 11, i got error in "npm run build" command .
Error-
" Error: AngularCompilerPlugin is running in a child compilation, but couldnot find a WebpackCompilerHost in the parent compilation."
my workbook config file -
const { InjectManifest } = require('workbox-webpack-plugin');
const AotPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
const path = require('path');
module.exports = {
plugins: [
new InjectManifest({
maximumFileSizeToCacheInBytes: "26214400",
compileSrc: true,
swDest: "service-worker.js",
swSrc: "./src/app/utilities/service-worker.ts",
webpackCompilationPlugins: [
new AotPlugin({
tsConfigPath: path.join(__dirname, '../src/tsconfig.app.json'),
// mainPath: path.join(__dirname, './src/main.ts'),
// typeChecking: false,
}),
]
})
]
};
I am using -
"workbox-routing": "^5.1.3",
"workbox-precaching": "^5.1.3",
"workbox-core": "^5.1.3",
"workbox-webpack-plugin": "^5.1.3"
"workbox-cli": "^5.1.3",
"webpack-cli": "^3.3.7",
tsconfig file
{
"compileOnSave": false,
"compilerOptions": {
"downlevelIteration": true,
"importHelpers": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2018",
"skipLibCheck": true,
"typeRoots": ["node_modules/@types"],
"lib": ["es2017", "dom", "webworker"],
"module": "ES2020",
"baseUrl": "./",
"strict": false
}
}
COuld you please help me to resolve this issue.
The text was updated successfully, but these errors were encountered: