rollup-plugin-postcss icon indicating copy to clipboard operation
rollup-plugin-postcss copied to clipboard

Trim inline sourcemaps emitted from other rollup plugin

Open putradimas opened this issue 6 years ago • 1 comments

I'm using svelte and when I enable emitCss option, rollup-plugin-postcss should receive css "files" with inline sourcemap.

rollup.config.js

...

plugins: [
    svelte({
        ...
        // Emit CSS as "files" for other plugins to process
        emitCss: true
    }),
    
    postcss({
        extract: true,
        sourceMap: true
    })
   
    ...
]

...

But the output has 2 sourcemaps, the inline sorcemap from the emitted svelte css files and from the postcss generated sourcemap. It would be nice to trim the emitted inline sourcemap and extract it to the specified .map file, reducing the file size significantly.

putradimas avatar Jan 02 '20 10:01 putradimas

Unfortunately, sourceMap: true doesn't seem to work as expected, even with the built-in support for nanocss.

If I use a simple postcss({ minimize: true, sourceMap: true }), the CSS sourcemap ends up inline - I'm not sure what sourceMap: "inline", which is mentioned in the documentation, would do differently? It seems the sourcemap is inline no matter what I do.

mindplay-dk avatar Aug 03 '21 07:08 mindplay-dk