-
Notifications
You must be signed in to change notification settings - Fork 215
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
Fix babel-plugin-inline-webgl-constants
#1859
Fix babel-plugin-inline-webgl-constants
#1859
Conversation
If I recall correctly, in this module we used to work around the "inliner" simply by importing the modules under a different name `import {GL as GLEnum, GL as GL_CONSTANTS, ...}. The The main other thing that changed in the constants module for v9 is that we had to change from |
I'll take a closer look on Monday, but I think renaming I'm still not quite sure how the babel plugin can import |
Note that the dev-modules folder is not part of the synchronized publishing process that we use for the main packages in the modules directory. You publish the dev modules separately, individually, "manually" at any time. |
I think I've resolved the open issues. Using a "GLEnum" alias instead of "EXCLUDED_TYPES" feels like a good approach to me. The rest of the changes are required to support the ESM import syntax. For future reference, my steps to make changes in this plugin were:
The unit tests are especially helpful in this case! |
Someone else may need to publish |
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.
LGTM, Let's get a stamp from @Pessimistress as well.
Thanks! I'll publish the plugin and merge the PR tomorrow. |
Seeing that the plugin's versioning is synced with the other luma.gl packages, I'm not confident publishing a release of the whole monorepo myself yet. I'll follow up about that in Slack. |
Fixes for
babel-plugin-inline-webgl-constants
in v9. I haven't published the plugin to npm, so I haven't added it back tobabel.config.cjs
yet either. When building locally, I needed to disable theocular-clean
step before each build, so that the constants are there when the plugin imports them. I don't know if that would be an issue once the plugin is published to npm? Or should we be doing something to ensure@luma.gl/constants
builds first, without this plugin?Changes:
@luma.gl/constants
does not fail