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.

Angular 5 Support #311

Closed
Closed
@sis0k0

Description

@sis0k0
  • Switch to use AngularCompilerPlugin instead of AotPlugin.
    For Angular 5 support, the new AngularCompilerPlugin should be used instead of the AotPlugin.
    This will depend on the @next tags of nativescript-angular which target Angular 5. Angular 5 Support: Switch to use AngularCompilerPlugin  #312

  • Remove UrlResolvePlugin
    UrlResolvePlugin should be removed as it uses the AotPlugin and tries to fetch _program (TS compilation) on the make life-cycle event of the webpack compilation. With the AngularCompilerPlugin, _program is not available on that step of the compilation.
    We can augment the input files system. However, there are problems with the AngularCompilerPlugin, which replaces the InputFileSystem code. CSS loader parsing CSS to JSON, platform suffix resolver and platform file system plugins #290

  • When compiling NativeScript Angular with ngc v5, metadata for polyfills gets generated too. However, these files doesn't contain decorators and Angular components/modules, and the metadata files contain only [null]. This causes the AngularCompiler Plugin to fail with the following error: https://gist.github.com/sis0k0/5f36e8f6e4177380e4fd55d500118663
    We can publish the metadata inside the npm package for nativescript-angular and manually remove the generated files for the polyfills.

  • If you use npm linked packages that have both .js and .ts files, webpack will prefer the .ts file and try to compile it with ngc. The compilation fails for nativescript-angular with NativeScriptModule is not an NgModule type of error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions