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

Vite-Compatibility #858

Closed
DotCoyote opened this issue Feb 9, 2022 · 6 comments
Closed

Vite-Compatibility #858

DotCoyote opened this issue Feb 9, 2022 · 6 comments

Comments

@DotCoyote
Copy link

Currently this package doesn't work with Vite, but with webpack only. Is there any plan to make it compatible?

@DotCoyote
Copy link
Author

/app/node_modules/.vite/@telekom_scale-components_loader.js
3020|      return module[exportName];
3021|    }
3022|    return import(
   |                  ^
3023|      /* webpackInclude: /\.entry\.js$/ */
3024|      /* webpackExclude: /\.system\.entry\.js$/ */
The above dynamic import cannot be analyzed by vite.
See https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning.

@acstll
Copy link
Collaborator

acstll commented Feb 9, 2022

It's a known issue. Please see #369 and ionic-team/stencil#2827

It's not directly in our hands to fix this, but we'll be glad to help.

I'm thinking you've already guessed the problem lies within Stencil's lazy loading mechanics.

A workaround (I use myself) is to load Scale via plain old script tags (either from node_modules or somewhere else) in your index.html, like this: https://github.com/telekom/scale#setup-with-plain-html — I hope this helps

@DotCoyote
Copy link
Author

Thanks for the quick reply! Yeah, we're using that workaround for now, but of course it'd be nice to have the typescript support in the IDE 😉

But I will watch your linked issues!

@acstll
Copy link
Collaborator

acstll commented Feb 9, 2022

I agree a 100%. Better IDE support is in our roadmap 🤓 Thank you for the feedback!

@schrej
Copy link
Member

schrej commented Jul 20, 2022

Seems this issue is now fixed in stencil: ionic-team/stencil#2827 (comment)
A feature flag is necessary to enable the fix though.

@acstll
Copy link
Collaborator

acstll commented Aug 1, 2022

Thank you @schrej!

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

3 participants