Skip to content

Commit 6d6cecc

Browse files
authored
feat: disable aot build for angular (use jit instead) (#56)
1 parent c051ebf commit 6d6cecc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

nativescript.webpack.js

+15
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,21 @@ function setupUnitTestBuild(config, env, webpack) {
8787
}));
8888
}
8989

90+
config.when(config.plugins.has('AngularWebpackPlugin'), (config) => config.plugin('AngularWebpackPlugin').tap((args) => {
91+
args[0] = merge(args[0], { jitMode: true });
92+
return args;
93+
}));
94+
config.when(config.module.rules.has('angular-webpack-loader'), (config) => {
95+
const options = config.module
96+
.rule('angular-webpack-loader')
97+
.uses.get('webpack-loader').get('options');
98+
config.module
99+
.rule('angular-webpack-loader')
100+
.uses.get('webpack-loader').options(
101+
merge(options, { aot: false, optimize: false })
102+
);
103+
});
104+
90105
config.plugin('DefinePlugin').tap((args) => {
91106
args[0] = merge(args[0], {
92107
'global.TNS_WEBPACK': true,

0 commit comments

Comments
 (0)