Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Build optimizer: removing BrowserAnimationsModule #78

Closed
@valorkin

Description

@valorkin

"@angular/cli": "1.3.0-rc.5"
"typescript": "2.4.2" ( and 2.3.4)

Workaround: ng build --preserve-symlinks allows to work with npm linked modules,
and remove tsconfig path entries

Issue:
BrowserAnimationsModule is completely removed from main.js bundle
which leads to issue in _createProviderInstance
here: https://github.com/angular/angular/blob/39b92f7e546b8bdecc0e08c915d36717358c122b/packages/core/src/view/ng_module.ts#L110

because ctor will be undefined

How to reproduce

  1. ng new test-bob
  2. in app.module.ts add
    import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
    and
  imports: [
    BrowserModule,
    BrowserAnimationsModule
  ],
  1. in tsconfig.app.json add line to paths
"types": [],
    "paths": {
      "@angular/*": ["../node_modules/@angular/*"]
    }

Why add this kind of mapping?
It is needed for successful build when you work with linked angular modules

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions