-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Exported components from a rollup package used in Astro return error of incorrect css
usage
#34
Comments
This is a packaging issue, as your Astro config is explicitly defined not to include |
Changing the plugin field for rollup: import withSolid from "rollup-preset-solid";
import solidStyled from 'rollup-plugin-solid-styled';
export default withSolid({
targets: ["esm", "cjs"],
input: 'src/index.tsx',
plugins: [solidStyled()]
// or plugins: [solidStyled({})]
}); Throws the error:
I am also using the solid rollup preset. |
classic. Can you try |
Using a solid-styled component inside astro locally works fine ex:
https://github.com/xypnox/xip/blob/5a7d8731d9b9bde7d4d688870551d8ec23628226/packages/xip-warehouse/src/components/pureStyled.tsx#L1-L12
However, using from a package: https://github.com/xypnox/xip/blob/5a7d8731d9b9bde7d4d688870551d8ec23628226/packages/xip-warehouse/src/components/ui.tsx#L15-L22
Results in the error:
Unexpected use of css. Make sure that solid-styled's plugin is setup correctly.
Reference
The text was updated successfully, but these errors were encountered: