-
Notifications
You must be signed in to change notification settings - Fork 155
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
plugins: Migrate plugins to vite #2001
base: main
Are you sure you want to change the base?
Conversation
b852dc6
to
c553a32
Compare
e233d67
to
643bd34
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please rebase against main?
(Also I'm not sure if that snyk check failing is still relevant? I thought you had made a change for that issue already?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed a few things.
Seems the package exclude change needs to be added in here as well? (for the snyk license check)
@@ -1,5 +0,0 @@ | |||
// @ts-nocheck | |||
import { initTests } from '@kinvolk/headlamp-plugin/config/storyshots/storyshots-test'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this can be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since it's a template for new plugins so I don't see a risk there. If storyshots plugin is deprecated I think it's fair for us to not support it. Keeping storyshots tests for plugins is not trivial, we would effectively need to maintain a copy of 'storyshots-tests' plugin that works with vite
The issue for this is here: #1282 (should go in the PR description) |
3127480
to
01c5d0f
Compare
a2bdcef
to
1bcc4cb
Compare
Does this allow plugins to access environment variables at build time too? Here's the issue for that: (but it shouldn't block this PR being merged if it doesn't support it yet) |
It does not provide |
Rebased and fixed merge conflicts |
ba88c17
to
41cd299
Compare
Added This allows plugins use default imports from pluginLib the same way webpack plugins do. It checks for the __esModule field and will get the default export. Tested the Kompose plugin (built with vite) with main (vite) and with 0.24.1 (webpack) With this change all combinations of webpack frontend, vite frontend, webpack plugin, vite plugin should work together |
Did some additional testing |
4750b3e
to
b3f188a
Compare
0977a49
to
b20d38f
Compare
atob function is enough and simpler Signed-off-by: Oleksandr Dubenko <[email protected]>
Signed-off-by: Oleksandr Dubenko <[email protected]>
Signed-off-by: Oleksandr Dubenko <[email protected]>
This PR continues vite migration. First part is in PR here #1981
Fixes this #1282
Testing done