-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
CSS Preprocessor for link elements has inconsistency between Dev and build #8406
Comments
related: #8397 |
UPD:
Just like this should work fine |
I think it is expected. Because |
@iDumpOnYou: Confirmed. Removing the type does indeed work for me on Dev. This is still an inconsistency, but I'm OK closing this issue if this is expected behaviour. |
I'm seeing the opposite now on Vite 4.2.0. If I include a custom I'm trying to find a solution to include SCSS at the very end of all CSS/SCSS that gets injected into my page, but this seems to be impossible. No matter how I order things in So I tried including my SCSS I've got no other ideas at the moment, any suggestions? |
Closing this for now according to #8406 (comment). The way we handle links now isn't very ideal. In builds, we're re-printing the CSS links which leads to this. So issues like additional attributes are not copied over. For further work on this, I think we can follow #8739 and #9402. @dennismcknight-tr your issue should be related to #8739 |
Describe the bug
link
elements are not correctly compiled in dev mode, however they work as expected when built for production.That is, if
index.html
contains a link element in thehead
like so:Then, running with
npm run dev
will not compile or pre-process the link tag. It will be inclued verbatim as it appears in the source.Development (
npm run dev
) example:However, running with
npm run build
will indeed compile thelink
tag, and substitute the compiled CSS correctly.Production (
npm run build
) example:No errors or issues are output to the logs in either case.
Reproduction
https://stackblitz.com/edit/vitejs-vite-2wumsd?file=index.html
System Info
System: OS: macOS 12.3.1 CPU: (8) arm64 Apple M1 Memory: 90.56 MB / 8.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 17.6.0 - /opt/homebrew/bin/node npm: 7.15.0 - /usr/local/bin/npm Browsers: Chrome: 101.0.4951.64 Firefox: 98.0 Safari: 15.4 npmPackages: vite: ^2.9.9 => 2.9.9
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: