Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Make dev mode reflect changes to css #1439

Merged
merged 1 commit into from Aug 26, 2020

Conversation

benmccann
Copy link
Member

When you make a change to a css file the change isn't showing up. The issue was in the lines:

that.css_files.push({ id, code });
.
.
.
const f = that.css_files.find(file => file.id === css_module);

When a change was encountered it would push the updated code to the end of the array, but then we'd find the first version. I changed it to a map instead and it works now.

Ironically this was pretty much the only line of css handling that didn't change in #1415. This sounded like a new issue from the bug reporter in Discord, but I'm not quite sure why it wouldn't have been happening before since it didn't change. Possibly the duplicate CSS bug covered it up if the original CSS didn't change and the duplicate did.

@benmccann benmccann added the bug label Aug 26, 2020
@antony antony self-requested a review August 26, 2020 16:07
Copy link
Member

@antony antony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm this works with my minimal reproduction!

@benmccann benmccann merged commit e3e3ec6 into sveltejs:master Aug 26, 2020
@antony antony added this to the 0.28.2 milestone Aug 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants