mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
fixed build with latest dependencies
This commit is contained in:
30
webpack/webpack.aot.js
Normal file
30
webpack/webpack.aot.js
Normal 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
|
||||
};
|
Reference in New Issue
Block a user