fixed build with latest dependencies

This commit is contained in:
William Welling
2017-09-26 10:37:54 -05:00
parent fe897f30df
commit 88120dd85b
16 changed files with 91 additions and 210 deletions

30
webpack/webpack.aot.js Normal file
View File

@@ -0,0 +1,30 @@
const {
root
} = require('./helpers');
const {
AotPlugin
} = require('@ngtools/webpack');
const tsconfigs = {
client: root('./src/tsconfig.browser.json'),
server: root('./src/tsconfig.server.json')
};
/**
* Generates a AotPlugin for @ngtools/webpack
*
* @param {string} platform Should either be client or server
* @param {boolean} aot Enables/Disables AoT Compilation
* @returns {AotPlugin} Configuration of AotPlugin
*/
function getAotPlugin(platform, aot) {
return new AotPlugin({
tsConfigPath: tsconfigs[platform],
skipCodeGeneration: !aot
});
}
module.exports = {
getAotPlugin: getAotPlugin
};