Skip to content

Allow to generate code for files outside of rootDir (e.g. in node_modules) #19337

Closed

Description

@tbosch

With current ng5 we don't generate code for libraries outside of rootDir.

We should implement this properly (e.g. so that this also work in watch mode, ...).

Algorithm for mapping path to rootDir:

  • take common prefix from path and rootDir
  • count all ..
  • produce path rootDir/dotDotCount/suffix

It is important that the generated path can be mapped back to the original file without extra caches, ... as TS might ask for generated files directly when passing an oldProgram, without looking at the base file first.

Activity

  1. tbosch commented on Sep 22, 2017

    @tbosch
    ContributorAuthor

    Note that this is non trivial, as we drive the generated path of a file from the path of the file in several places in Angular.

  2. tbosch commented on Oct 31, 2017

    @tbosch
    ContributorAuthor

    We determined that it's works as intended that we don't generate code for files outside of rootDir.

  3. angular-automatic-lock-bot commented on Sep 12, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  4. locked and limited conversation to collaborators on Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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