-
Notifications
You must be signed in to change notification settings - Fork 615
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
bug: exposed methods in @openshift-console/dynamic-plugin-sdk/lib/utils/k8s refer to @console/internal #12255
Comments
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
/remove-lifecycle rotten |
This is still, almost two years later, a problem as of the latest version (0.0.21) of @openshift-console/dynamic-plugin-sdk. Is this something you look into? |
Hi, sorry for missing this issue. Console plugin SDK packages are meant for building Console dynamic plugins which are loaded and executed in the Console web application. In other words, these packages are not meant for use in other kinds of projects, i.e. standalone web applications. Console dynamic plugins must be built with webpack 5+ and must use
Building with esbuild does not work because More importantly, Console treats the whole plugin SDK packages as shared modules, see shared-modules.ts for reference: '@openshift-console/dynamic-plugin-sdk': { singleton: true, allowFallback: false },
'@openshift-console/dynamic-plugin-sdk-internal': { singleton: true, allowFallback: false }, both the "core" and "internal" SDK package (module) implementation is provided by Console itself. So I'm not really sure what you're trying to do 😕 |
When trying to use functions in @openshift-console/dynamic-plugin-sdk/lib/utils/k8s, the build is failing because it tries to resolve @console/internal. Webpack does not find this module, and hence fails.
A minimal setup reproducing the error:
package.json
index.mjs
Install and build with esbuild:
If you remove the offending line,
node_modules/@openshift-console/dynamic-plugin-sdk/lib/utils/k8s/k8s-utils.js:7
, it works (both Esbuild and Webpack are happy and the utils I am using works).The text was updated successfully, but these errors were encountered: