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

Rollup plugin: support app usage #42

Merged
merged 3 commits into from
Oct 25, 2024
Merged

Rollup plugin: support app usage #42

merged 3 commits into from
Oct 25, 2024

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Oct 25, 2024

The rollup plugin as currently written only really works for library development, where you want to emit separate CSS files that are imported from your published JS files.

But we'll also want to use it in apps, where those apps are building with Vite (or directly with Rollup).

This PR simplifies the plugin so it just worries about emitting CSS and doesn't care exactly how that CSS gets further processed.

To make this continue to work in v2 addons, I've adjusted the implementaiton of the keepAssets plugin so that it will compose nicely with a plugin like this one that emits CSS. So you'll want to update @embroider/addon-dev to a version that includes that PR.

In Vite, it just works with no further configuration since vite handles CSS imports out-of-the-box.

The rollup plugin as currently written only really works for library development, where you want to emit separate CSS files that are imported from your published JS files.

But we'll also want to use it in apps, where those apps are building with Vite (or directly with Rollup).

This PR simplifies the plugin so it just worries about emitting CSS and doesn't care exactly how that CSS gets further processed.

To make this continue to work in v2 addons, I've [adjusted the implementaiton of the keepAssets plugin](embroider-build/embroider#2156) so that it will compose nicely with a plugin like this one that emits CSS. So you'll want to update `@embroider/addon-dev` to a version that includes that PR.

In Vite, it just works with no further configuration since vite handles CSS imports out-of-the-box.
@ef4 ef4 added the breaking label Oct 25, 2024
@types/qunit 2.19.11 doesn't work with the ember-qunit setup that this app has. It does apparently work in a clean newly-generated app using ember's native types, instead of all the older `@types/ember__*` packages.

But our test matrix currently includes versions that don't support the nice new native ember types, so I'm just limiting the @types/qunit upgrade for now.
@ef4 ef4 merged commit 8084e6a into main Oct 25, 2024
10 checks passed
@github-actions github-actions bot mentioned this pull request Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant