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

Relative asset import don't work until the CSS is changed #20919

Closed
1 of 15 tasks
Den-dp opened this issue May 24, 2021 · 5 comments
Closed
1 of 15 tasks

Relative asset import don't work until the CSS is changed #20919

Den-dp opened this issue May 24, 2021 · 5 comments

Comments

@Den-dp
Copy link

Den-dp commented May 24, 2021

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was: 12.0.0

Description

Image imported in CSS is not present in WDS after the first compilation.

🔬 Minimal Reproduction

  1. run the following
git clone https://github.com/Den-dp/ng-relative-asset-import-example
cd ng-relative-asset-import-example
npm i
npm start
  1. open http://localhost:4200

expected:
served site should display download.svg as a background.

actual:
404 in the network and http://localhost:4200/webpack-dev-server confirms that there is no download.svg served by WDS.

Any change in src/app/app.component.css fixes the problem.

🔥 Exception or Error


GET http://localhost:4200/download.svg 404 (Not Found)

🌍 Your Environment


Angular CLI: 12.0.1
Node: 14.15.5
Package Manager: npm 6.14.13
OS: win32 x64

Angular: 12.0.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.1
@angular-devkit/build-angular   12.0.1
@angular-devkit/core            12.0.1
@angular-devkit/schematics      12.0.1
@schematics/angular             12.0.1
rxjs                            6.6.7
typescript                      4.2.4

Anything else relevant?

Might be related to #20882 and #20885

@nukithelegend
Copy link

Same problem here. We have a complex hybrid setup and updating from 12 to 12.0.1 broke our css background-images from loading. The css itself is unchanged, but the files/locations have been changed.

@alan-agius4
Copy link
Collaborator

Duplicate of #20916 and #20882

@Den-dp
Copy link
Author

Den-dp commented May 24, 2021

@alan-agius4 I hope this will not be forgotten since both tickets are closed 🙂 🙏

@alan-agius4
Copy link
Collaborator

@alan-agius4 I hope this will not be forgotten since both tickets are closed 🙂 🙏

That’s because it has already been fixed, and the fix will be available in 12.0.2

@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 Jun 24, 2021
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

3 participants