mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Fixed AoT Build
This commit is contained in:
@@ -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
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user