Skip to content

Empty source map with localization and --watch #17131

Closed
@richtems

Description

@richtems

🐞 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 ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions