Fixed AoT Build

This commit is contained in:
Art Lowel
2018-01-23 15:16:22 +01:00
parent 107a0736c6
commit 962d87173e
8 changed files with 181 additions and 155 deletions

View File

@@ -3,7 +3,7 @@ const {
} = require('./helpers');
const {
AotPlugin
AngularCompilerPlugin
} = require('@ngtools/webpack');
const tsconfigs = {
@@ -11,6 +11,11 @@ const tsconfigs = {
server: root('./src/tsconfig.server.json')
};
const aotTsconfigs = {
client: root('./src/tsconfig.browser.json'),
server: root('./src/tsconfig.server.aot.json')
};
/**
* Generates a AotPlugin for @ngtools/webpack
*
@@ -19,8 +24,8 @@ const tsconfigs = {
* @returns {AotPlugin} Configuration of AotPlugin
*/
function getAotPlugin(platform, aot) {
return new AotPlugin({
tsConfigPath: tsconfigs[platform],
return new AngularCompilerPlugin({
tsConfigPath: aot ? aotTsconfigs[platform] : tsconfigs[platform],
skipCodeGeneration: !aot
});
}