mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 03:01:51 +08:00
fix(webpack): support angular 15.x (#10106)
This commit is contained in:
@ -1,5 +1,12 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`angular configuration @angular-devkit/build-angular backwards compatible sets scriptTarget for version <15 1`] = `
|
||||
{
|
||||
"aot": true,
|
||||
"scriptTarget": 99,
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`angular configuration for android 1`] = `
|
||||
"{
|
||||
mode: 'development',
|
||||
@ -201,7 +208,6 @@ exports[`angular configuration for android 1`] = `
|
||||
{
|
||||
loader: '@angular-devkit/build-angular/src/babel/webpack-loader',
|
||||
options: {
|
||||
scriptTarget: 99,
|
||||
aot: true
|
||||
}
|
||||
}
|
||||
@ -625,7 +631,6 @@ exports[`angular configuration for ios 1`] = `
|
||||
{
|
||||
loader: '@angular-devkit/build-angular/src/babel/webpack-loader',
|
||||
options: {
|
||||
scriptTarget: 99,
|
||||
aot: true
|
||||
}
|
||||
}
|
||||
|
@ -77,4 +77,26 @@ describe('angular configuration', () => {
|
||||
|
||||
polyfillsPath = false;
|
||||
});
|
||||
|
||||
describe('@angular-devkit/build-angular backwards compatible', () => {
|
||||
beforeAll(() => {
|
||||
jest.mock('@angular-devkit/build-angular/package.json', () => ({
|
||||
version: '14.0.0',
|
||||
}));
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
jest.unmock('@angular-devkit/build-angular/package.json');
|
||||
});
|
||||
|
||||
it('sets scriptTarget for version <15', () => {
|
||||
const config = angular(new Config());
|
||||
expect(
|
||||
config.module
|
||||
.rule('angular-webpack-loader')
|
||||
.use('webpack-loader')
|
||||
.get('options')
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user