thgh / rollup-plugin-scss

Rollup and compile multiple .scss, .sass and .css imports
MIT License
134 stars 47 forks source link

Generated an empty chunk #106

Open martindybal opened 1 year ago

martindybal commented 1 year ago

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
thgh commented 1 year ago

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

martindybal commented 1 year ago

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

My whole config:

[
    scss({
        outputStyle: minify ? 'compressed' : 'expanded',
        sourceMap: !minify,
    }),
]
xaviemirmon commented 1 year ago

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

martindybal commented 1 year ago

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