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

Generated an empty chunk

Open martindybal opened this issue 2 years ago • 4 comments

I'm trying to use the plugin, but I getting info message:

bundles ./Controls/Navigation/navigation.scss → wwwroot/Controls/Navigation/navigation.css...
(!) Generated an empty chunk

It will generate an empty navigation.css file.

rollup.config.js

[
    scss({
        outputStyle: minify ? 'compressed' : 'expanded',
        sourceMap: !minify,
    }),
]

navigation.scss

nav {
    background-color: var(--color-primary);
}

If I add processor. It write correct css to console.

        processor: (css, map) => {
            console.log(map);
            console.log(css);
            return {};
        }

So question is why is generated file empty?

image

martindybal avatar Feb 03 '23 15:02 martindybal

Probably the return {};, it should be return { css };

thgh avatar Feb 06 '23 12:02 thgh

I don't use that process. I used it only for test.

My whole config:

[
    scss({
        outputStyle: minify ? 'compressed' : 'expanded',
        sourceMap: !minify,
    }),
]

martindybal avatar Feb 06 '23 20:02 martindybal

I am also running into this issue. @martindybal did you find a way to fix it?

xaviemirmon avatar May 10 '23 16:05 xaviemirmon

@xaviemirmon No, I didn't use this plugin. I used Sass directly.

martindybal avatar May 18 '23 20:05 martindybal