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

How to use this with svelte, css, various import types? #224

Open
RobbieTheWagner opened this issue May 23, 2024 · 2 comments
Open

How to use this with svelte, css, various import types? #224

RobbieTheWagner opened this issue May 23, 2024 · 2 comments

Comments

@RobbieTheWagner
Copy link

Question

Hi! I am trying to use this plugin to simplify out setup for generating types for Shepherd.js. However, I have been unable to get it to run because we have some Svelte files and those files generate some CSS files and we have CSS imports in the library etc.

I am unsure if it is just the order of the plugins I am using or if we need extra steps to make things work. Do you have any tips on how to get things working?

Are we supposed to exclude CSS, Svelte etc files with exclude: ['**/*.css', '**/*.svelte']? Or are my plugins out of order and there is a way to not exclude them?

@RobbieTheWagner
Copy link
Author

If I exclude those file types, I get a different error:

│ [!] RollupError: src/utils/floating-ui.ts (4:2): "autoUpdate" is not exported by "../node_modules/.pnpm/@floating-ui+dom@1.6.3/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts", imported by "src/utils/floating-ui.ts".
│ https://rollupjs.org/troubleshooting/#error-name-is-not-exported-by-module
│ src/utils/floating-ui.ts (4:2)
│ 2: import { shouldCenterStep } from './general.ts';
│ 3: import {
│ 4:   autoUpdate,
│      ^

I am unsure why it thinks autoUpdate is not exported because it definitely is in the node_modules. Is there something we need to do to make this plugin aware of it? I am using @rollup/plugin-node-resolve so I would assume it could find the node_modules files.

If you would like to see what I currently have, it is in this PR: shipshapecode/shepherd#2820

@RobbieTheWagner
Copy link
Author

I would be happy to sponsor your work here @wessberg, if I can figure out how to get this working for Shepherd 😄

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

No branches or pull requests

1 participant