forked from hazza/dspace-angular
removed node env variable
This commit is contained in:
@@ -1,35 +1,37 @@
|
||||
const {
|
||||
buildRoot
|
||||
buildRoot
|
||||
} = require('./helpers');
|
||||
|
||||
const {
|
||||
AngularCompilerPlugin
|
||||
AngularCompilerPlugin
|
||||
} = require('@ngtools/webpack');
|
||||
|
||||
const tsconfigs = {
|
||||
client: buildRoot('./tsconfig.browser.json'),
|
||||
server: buildRoot('./tsconfig.server.json')
|
||||
};
|
||||
module.exports = (env) => {
|
||||
const tsconfigs = {
|
||||
client: buildRoot('./tsconfig.browser.json', env),
|
||||
server: buildRoot('./tsconfig.server.json', env)
|
||||
};
|
||||
|
||||
const aotTsconfigs = {
|
||||
client: buildRoot('./tsconfig.browser.json'),
|
||||
server: buildRoot('./tsconfig.server.aot.json')
|
||||
};
|
||||
const aotTsconfigs = {
|
||||
client: buildRoot('./tsconfig.browser.json', env),
|
||||
server: buildRoot('./tsconfig.server.aot.json', env)
|
||||
};
|
||||
|
||||
/**
|
||||
* 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 AngularCompilerPlugin({
|
||||
tsConfigPath: aot ? aotTsconfigs[platform] : tsconfigs[platform],
|
||||
skipCodeGeneration: !aot
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 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 AngularCompilerPlugin({
|
||||
tsConfigPath: aot ? aotTsconfigs[platform] : tsconfigs[platform],
|
||||
skipCodeGeneration: !aot
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getAotPlugin: getAotPlugin
|
||||
return {
|
||||
getAotPlugin: getAotPlugin
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user