Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: emitFile error when some file content is empty #220

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

southorange0929
Copy link

https://github.com/southorange1228/rollup-style-demo

Just like this demo, if less file content is empty, the file can't be created which source file content is empty.

And i changed rollup-plugin-style.

// before
        const cssFile = {
          type: "asset",
          name: res.name,
          source: res.css
        };
        const cssFileId = this.emitFile(cssFile);
// after
        const cssFile = {
          type: "asset",
          fileName: res.name,
          name: res.name,
          source: res.css
        };
        const cssFileId = this.emitFile(cssFile);

And this problem can be fixed.

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.

None yet

1 participant