Skip to content

Symlink doesn't work for template and css #17897

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

Closed
Lempkin opened this issue Jun 10, 2020 · 2 comments
Closed

Symlink doesn't work for template and css #17897

Lempkin opened this issue Jun 10, 2020 · 2 comments

Comments

@Lempkin
Copy link

Lempkin commented Jun 10, 2020

🐞 bug report

Affected Package

Angular 9.1.7

Is this a regression?

Yes, it used to work with angular 8

Description

I work on an application which uses some of our libraries.
I just upgraded the app and libraries from angular 8 to angular 9.
I used to use npm link to have code auto reload when I work on libraries (I create symlink from the library dist/ folder)
I used to run "ng build --watch" in library folder, and "ng serve" in the app.
When I was making changes in my library, library sources were automatically re-builded, then app's watcher detects something has changed and rebuild the app. And so I was able to immediately see my changes in navigator.

Since upgrade to angular 9, changes made in html template and css file are not shown. I have to kill the "ng serve" and relaunch it to be able to see the library changes .
What's weird is that when I made change in library, the app watcher still detects that something has changed somewhere and rebuild the app.
Also changes made in the library controller are shown immediately, only changes in html and css will not show, and needs a kill + relaunch ng serve.

I've searched in the node_module/library_folder (which is a symlink) and I do see the html/css changes in the sources.

I do have the "preserveSymlinks": true property in app's angular.json
Ivy is disabled for now.

🔬 Minimal Reproduction

https://stackblitz.com/...

🔥 Exception or Error





🌍 Your Environment

Angular Version: 9.1.7
Angular CLI: 9.1.6
Node: 13.7.0
OS: win32 x64

Angular: 9.1.7
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: No

Package Version

@angular-devkit/architect 0.901.6
@angular-devkit/build-angular 0.901.6
@angular-devkit/build-ng-packagr 0.901.6
@angular-devkit/build-optimizer 0.901.6
@angular-devkit/build-webpack 0.901.6
@angular-devkit/core 9.1.6
@angular-devkit/schematics 9.1.6
@angular/cdk 9.2.3
@angular/cli 9.1.6
@angular/flex-layout 9.0.0-beta.31
@angular/material 9.2.3
@angular/material-moment-adapter 9.2.3
@ngtools/webpack 9.1.6
@schematics/angular 9.1.6
@schematics/update 0.901.6
ng-packagr 9.0.3
rxjs 6.5.5
typescript 3.8.3
webpack 4.42.0

Anything else relevant?

@pkozlowski-opensource pkozlowski-opensource transferred this issue from angular/angular Jun 10, 2020
@alan-agius4
Copy link
Collaborator

alan-agius4 commented Jun 10, 2020

Duplicate of #13588

This happens when you build the application in AOT and using the old deprecated rendering engine (VE).

The fix for this is to either use Ivy or disable AOT during development.

@alan-agius4 alan-agius4 marked this as a duplicate of #13588 Jun 10, 2020
@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 Jul 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants