Skip to content
New issue

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

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

Already on GitHub? # to your account

Unreasonably long bundling time after updating rollup-plugin-css-only from 3.1.0 to 4.2.0 #49

Closed
Snailedlt opened this issue Oct 28, 2022 · 8 comments · Fixed by #58
Closed

Comments

@Snailedlt
Copy link

Hi, we're using this project in a government project written in svelte. After updating rollup-plugin-css-only from 3.1.0 to 4.2.0 we're experiencing a significant increase in the bundling time.

After running npm i and npm run dev with the following setup "dev": "rollup -c -w", it runs in 5min instead of 12 seconds. The same happens with npm run build with the following setup "build": "rollup -c"

The only changes done were to package.json and package-lock.json (PR by dependabot), so we are sure the issue is with this plugin, but not sure exactly what the issue is.

Before updating: 12.2s
image

After updating: 5m 16s
image

The project is private, so I can't share much, but here's some config files we use, which may or may not be relevant:
project_config_files.zip

Let me know if you need any more info, and I'll try to provide it quickly

@thgh
Copy link
Owner

thgh commented Oct 29, 2022

Interesting that dependabot suggests major upgrades. I could release a minor upgrade to v3 with only rollup 3 support?

@Snailedlt
Copy link
Author

Snailedlt commented Oct 29, 2022

Does that mean it should not have suggested that update to us? If so, why not... and do you know why bundling takes so long?

@Snailedlt
Copy link
Author

Also I see v4 brought some breaking changes, but couldn't find any info on what needs to be changed in order to make it work again. Is the migration process documented anywhere?

@thgh
Copy link
Owner

thgh commented Oct 30, 2022

To be honest, I'm not using this module/Rollup anymore. The main change is that you should replace the output option with the name or filename option.

@Snailedlt
Copy link
Author

Ahh, okey :)
You're talking about this then, right? :)
css({ output: 'bundle.css' })

Should it be replaced with this?
css({ filename: 'bundle.css' })

@nikolas
Copy link
Contributor

nikolas commented Oct 31, 2022

I ran into this problem, too. Downgrading to version 3.1.x fixed the problem. ccnmtl/3demos#90

@nikolas
Copy link
Contributor

nikolas commented Oct 31, 2022

Using the new version (4.2.0), css({ filename: 'bundle.css' }) doesn't seem to fix the problem, either. I think I will just stick with the old version.

@thgh
Copy link
Owner

thgh commented Jul 16, 2023

Using v3 is fine, v4 is just there because Rollup provided a new API that may be more powerful.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants