Closed
Description
OS?
Windows 10
Versions.
node v6.9.4
Repro steps.
I have an app set up with
@ngtools/webpack
v1.2.0 andwebpack
v2.1.0-beta.27. When I try to upgrade to any of v1.2.1, v1.2.2, v1.2.3 or v1.2.4 (and also the required webpack version) I get the following error:
ERROR in ./src/boot-client-aot.ts
Module not found: Error: Can't resolve './components/main.aot.ngfactory' in 'XXXXX\src'
@ ./src/boot-client-aot.ts 5:0-70
boot-client-aot.ts
:
import "./polyfills";
import "./rxjs-operators";
import { enableProdMode } from '@angular/core';
import { platformBrowser } from "@angular/platform-browser";
import { MainModuleNgFactory } from "./components/main.aot.ngfactory";
enableProdMode();
// Boot the application, either now or when the DOM content is loaded
const platform = platformBrowser();
const bootApplication = () => { platform.bootstrapModuleFactory(MainModuleNgFactory); };
if (document.readyState === "complete") {
bootApplication();
}
else {
document.addEventListener("DOMContentLoaded", bootApplication);
}
Webpack config:
var ngToolsWebpack = require("@ngtools/webpack");
// ....
plugins: [
new ngToolsWebpack.AotPlugin({
tsConfigPath: path.resolve(__dirname, "tsconfig.aot.json"),
entryModule: path.resolve(__dirname, "ClientApp", "components", "main.aot#MainModule"),
}),
It's worth noting that I tried different paths for the plugin configuration without success, including setting them through my tsconfig.aot.json
.
Any help would be appreciated. Thanks!