Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Executing the update script update-ns-webpack breaks the AoT compilation in code-sharing projects #980

Open
@sis0k0

Description

@sis0k0

Describe the bug
The newly generated code-sharing applications come with a custom tsconfig.tns.json configuration file. Executing the update script from nativescript-dev-webpack (npx update-ns-webpack --configs) overrides the existing tsconfig.tns.json file with the default configuration file - https://github.com/NativeScript/nativescript-dev-webpack/blob/master/templates/tsconfig.tns.json.
However, the AoT compilation in the code-sharing project doesn't work with the default tsconfig file.

To Reproduce

npm i -g @angular/cli @nativescript/schematics@next
ng new --collection=@nativescript/schematics my-shared-project --shared
cd my-shared-project
npx update-ns-webpack --configs
tns build --bundle --env.aot

Expected behavior
Executing the update script for the webpack plugin shouldn't break the code-sharing project.

Suggested solutions

  • Don't update the tsconfig.tns.json file at all.
  • In the update script, read the tsconfig.tns.json file and omit its update if its content matches exactly the content of a code-sharing config file.
  • Detect that the project is a code-sharing one and then - skip the update of the tsconfig.tns.json file.
  • Please comment with any suggestions you might have.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions