Skip to content

CSS sourcemaps#698

Merged
Rich-Harris merged 9 commits intomasterfrom
gh-691
Jul 10, 2017
Merged

CSS sourcemaps#698
Rich-Harris merged 9 commits intomasterfrom
gh-691

Conversation

@Rich-Harris
Copy link
Copy Markdown
Member

The immediate goal of this PR is to add support for CSS sourcemaps. The approach I'm taking is to move all the CSS logic into a new Stylesheet class, which is responsible for creating/transforming a separate MagicString instance.

This will make it a bit easier to remove unused rules altogether, and do e.g. whitespace removal. Ultimately we could even have multiple stylesheets attached to a component (for example, if a component had two or more <link rel='stylesheet'> tags, if we get round to that).

@Rich-Harris Rich-Harris changed the title [WIP] CSS sourcemaps CSS sourcemaps Jul 8, 2017
@Rich-Harris
Copy link
Copy Markdown
Member Author

Removing the [WIP]. Not addressed here — how to generate a sourcemap for concatenated CSS files (e.g. the CSS bundle generated by rollup-plugin-svelte). Probably outside Svelte's remit, though it's a little annoying to have to keep decoding, manipulating, combining and reencoding sourcemap mappings. (Sourcemaps are a pain.)

@Rich-Harris Rich-Harris merged commit f0fddaa into master Jul 10, 2017
@Rich-Harris Rich-Harris deleted the gh-691 branch July 10, 2017 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant