This repository was archived by the owner on Aug 7, 2021. It is now read-only.
-
- Notifications
You must be signed in to change notification settings - Fork 40
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
Bootstrap transformer changes the order of imports #639
Copy link
Copy link
Closed
Labels
angularbugnextThe problem is only with a prerelease version.The problem is only with a prerelease version.
Description
This issue is only for the
nextversion ofnativescript-dev-webpack. The problem is not present in the official version of the plugin.
When building with AoT, we use a TypeScript transformer to replace the dynamic bootstrap with a static one. The transformer changes the order of imports in a file. Example:
before transformation
import { platformNativeScriptDynamic } from "nativescript-angular/platform"; import { AppModule } from "./app.module"; import "./shared/kinvey.common"; platformNativeScriptDynamic().bootstrapModule(AppModule);after transformation
import "./shared/kinvey.common"; import { platformNativeScript } from "nativescript-angular/platform-static"; import { AppModuleNgFactory } from "./app.module.ngfactory"; platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory);This is a problem, because nativescript-angular/platform or nativescript-angular/platform-static should be the first import in the application. These modules contain important bootstrap logic that should be executed before anything else.
Metadata
Metadata
Labels
angularbugnextThe problem is only with a prerelease version.The problem is only with a prerelease version.