Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bazel): disable angular linker sourcemaps #385

Merged
merged 1 commit into from
Feb 4, 2022

Commits on Feb 4, 2022

  1. fix(bazel): disable angular linker sourcemaps

    When using the linker on `@angular/material` or packages which contain external sourcemap. The sourcemap will contain multiple sources example.
    
    Babel now uses [remapping](https://github.com/ampproject/remapping/) to merge sourcemaps, see: babel/babel#14209. This doesn't support multiple sources which the linker produduces. Previously, Babel failed silently and didn't generate a sourcemap angular/angular#42769 at all.
    
    Linker produced sourcemap
    ```js
      [
        '/packages/web-app-edit/Users/cli-reproductions/monorepo-new/node_modules/@angular/material/fesm2020/card.mjs',
        '/packages/web-app-edit/Users/src/material/card/card.html',
        '/packages/web-app-edit/Users/src/material/card/card-header.html',
        '/packages/web-app-edit/Users/src/material/card/card-title-group.html'
      ]
    ```
    
    Will cause the below error during merging
    ```
    Transformation map 0 must have exactly one source file.
    ```
    
    Related to
    - angular/angular#42769
    - angular/angular#44972
    
    Addresses CI failure
    - https://app.circleci.com/pipelines/github/angular/angular/42281/workflows/e060088b-5963-43b0-b6fc-b4ddd8855bee/jobs/1116551
    alan-agius4 committed Feb 4, 2022
    Configuration menu
    Copy the full SHA
    265811c View commit details
    Browse the repository at this point in the history