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

Empty source map with localization and --watch #17131

Closed
1 of 15 tasks
richtems opened this issue Mar 2, 2020 · 2 comments · Fixed by #17266
Closed
1 of 15 tasks

Empty source map with localization and --watch #17131

richtems opened this issue Mar 2, 2020 · 2 comments · Fixed by #17266
Labels
Milestone

Comments

@richtems
Copy link

richtems commented Mar 2, 2020

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was: 8.2.2

Description

When using @angular/localization and building with --watch, the main.js source map is empty.

🔬 Minimal Reproduction

ng new TestApp
cd .\TestApp\
ng add @angular/localize

Add i18n to project in angular.json:


"projects": {
  ...
  "TestApp": {
    ...
    "i18n": {
      "sourceLocale": "en-US",
      "locales": {
        "fr": "src/locale/messages.fr.xlf"
      }
    }
    ...
    "architect": {
      "build": {
          ...
          "options": {
            ...
            "localize": ["fr"],

ng xi18n
copy messages.xlf to "src/locale/messages.fr.xlf"
ng build --watch

Now the content of dist/TestApp/fr/main.js.map is:
{}

🌍 Your Environment




Angular CLI: 9.0.4
Node: 10.15.1
OS: win32 x64

Angular: 9.0.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.4
@angular-devkit/build-angular     0.900.4
@angular-devkit/build-optimizer   0.900.4
@angular-devkit/build-webpack     0.900.4
@angular-devkit/core              9.0.4
@angular-devkit/schematics        9.0.4
@ngtools/webpack                  9.0.4
@schematics/angular               9.0.4
@schematics/update                0.900.4
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2

Anything else relevant?

Might be related to #16526 ?

@richtems richtems changed the title Missing source map with localization and --watch Empty source map with localization and --watch Mar 2, 2020
@ngbot ngbot bot modified the milestone: needsTriage Mar 2, 2020
@alan-agius4 alan-agius4 added freq1: low Only reported by a handful of users who observe it rarely type: bug/fix labels Mar 2, 2020
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Mar 2, 2020
@clydin clydin self-assigned this Mar 9, 2020
@HitkoDev
Copy link

This also happens without --watch, as long as localize option is enabled. However, chunks without any localized content still have the correct source map. I believe angular/angular#33123 was supposed to solve this, but it's been closed and there's not yet an alternative proposed.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 24, 2020
@clydin clydin removed their assignment Jun 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants