-
-
Notifications
You must be signed in to change notification settings - Fork 286
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
How to Use smui with rollup and typescript? #556
Comments
I'm getting this same error. I'm not sure how to fix it. Nothing is importing |
I think I'm getting closer to understanding why this is happening. It looks like the Typescript plugin is resolving @smui imports when it shouldn't be. This is from Rollup's
|
Ok, I've figured it out. The Typescript Rollup plugin looks for a file resolved by Typescript, and if that file is found, it checks to see if it's named like a declaration file (*.d.ts). If it is, it returns |
My brain hurts after tracking that bug down. :P |
You need something like this in your rollup config: import resolve from '@rollup/plugin-node-resolve';
// then later in your plugins:
resolve({
browser: true,
exportConditions: ['default', 'module', 'import', 'svelte'],
extensions: ['.mjs', '.js', '.json', '.node', '.svelte'],
}) |
Here is my package.json:
Here is my rollup.config.js;
And index file;
It breaks on
import Button, { Label } from "@smui/button";
with error:Haven't had these problems before. Does anyone have a solution? Thanks.
The text was updated successfully, but these errors were encountered: