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

AngularCompilerPlugin hostReplacementPaths option does not work #11801

Closed
stevermeister opened this issue Aug 7, 2018 · 4 comments · Fixed by #11809
Closed

AngularCompilerPlugin hostReplacementPaths option does not work #11801

stevermeister opened this issue Aug 7, 2018 · 4 comments · Fixed by #11809
Labels
area: ngtools/webpack freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix

Comments

@stevermeister
Copy link

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

@filipesilva
Copy link
Contributor

This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please?

You can read here why this is needed. A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.

@filipesilva filipesilva added the needs: repro steps We cannot reproduce the issue with the information given label Aug 7, 2018
@Garbanas
Copy link

Garbanas commented Aug 7, 2018

@stevermeister The bug was introduced moving from 6.1.0-rc.1 to 6.1.0-rc.2, probably with this commit: 86a62ad

I just downgraded to 6.1.0-rc.1 for the time being

@faserg1
Copy link

faserg1 commented Aug 7, 2018

Same issue for me.

clydin added a commit to clydin/angular-cli that referenced this issue Aug 7, 2018
@clydin clydin added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity5: regression and removed needs: repro steps We cannot reproduce the issue with the information given labels Aug 7, 2018
@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 Sep 8, 2019
ikjelle pushed a commit to ikjelle/angular-cli that referenced this issue Mar 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: ngtools/webpack freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants