Skip to content

AngularCompilerPlugin hostReplacementPaths option does not work #11801

@stevermeister

Description

@stevermeister

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions

node: v9.2.1
npm: 6.3.0
ng: 6.1.2
macOS (High Sierra)

Repro steps

  • ng eject with ng-cli 1.7
  • update to Angular6.1.2
  • try to run webpack-devserver

Desired functionality

Mention any other details that might be useful

new AngularCompilerPlugin({
  ...
  hostReplacementPaths: {
    'environments/environment.ts': environmentFiles[NODE_ENV]
  },
  ...
})

does not replace the environment.ts file anymore.
because here it tries to normalize to absolute path and then comparing it with relative one - https://github.com/angular/angular-cli/blob/master/packages/ngtools/webpack/src/virtual_file_system_decorator.ts#L188

Here also question on SO - https://stackoverflow.com/questions/51676035/webpack-angularcompilerplugin-hostreplacementpaths-option-does-not-work

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions