-
Notifications
You must be signed in to change notification settings - Fork 624
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
Unable to import plugin-workspace-search 8.0.4 normally. #1877
Comments
@cpcallen I think I need your help with this one. For background, all of the plugins specify the It seems like we are using the It's also worth noting that the My best guess for what's happening is that the original reporter is using a build tool (Vite, which I know nothing about) that is more strict about the So I still have a bunch of unknowns, including:
What I think we should do:
@cpcallen does any of this sound plausible/reasonable? Any ideas on my unknowns? |
@technology-me did this work for you in |
[Edited to elaborate on earlier version:] Prior to PR #1857, this plugin was configured as a dual ESM + CJS (actually UMD) package:
When we migrated the module to TS we broke this because
I see a number of ways forward:
For plugins that are still written in JavaScript, there is an additional option: only publish the source code and do away with the build pipeline entirely. (This is option 4, minus We should probably consider this decision in the context of google/blockly#7449, though we might make different choices (for example, an ESM-loads-CJS wrapper might make sense for Blockly proper, but having one per plugin would entail either adding a common (non-dev) dependency to all the plugins, or a lot of duplication of wrapper code between (the built versions of) packages. |
Re option 4, publishing only individual
But on the other hand:
|
Separately, we should consider getting rid of trivial wrappers like |
Yes, I can still use v8.0.3 normally. |
I've attempted to build this plugin using esbuild (basically option 5 but without webpack) and it results in 10% smaller bundle size for cjs format.
for the current webpack setup:
|
I propose that we fix this temporarily by removing the We could make the same change to JS-soureced packages for consistency, but I don't see any reason to meddle since AFAIK there is nothing broken there that needs fixing. |
Fixes #1877. Don't advertise module entrypoints on packages that are implemented in TypeScript as at the moment our webpack configuration does not generate any file called src/index.js.
Fixes #1877. Don't advertise module entrypoints on packages that are implemented in TypeScript as at the moment our webpack configuration does not generate any file called src/index.js.
* fix: text join block warning when using block-plus-minus plugin * Update package.json * fix(packaging): Don't advertise non-existent ESM entrypoints (#2022) Fixes #1877. Don't advertise module entrypoints on packages that are implemented in TypeScript as at the moment our webpack configuration does not generate any file called src/index.js. * Revert "fix(packaging): Don't advertise non-existent ESM entrypoints (#2022)" This reverts commit 3382ac7. * update package-lock --------- Co-authored-by: Christopher Allen <[email protected]> Co-authored-by: Beka Westberg <[email protected]>
* fix: text join block warning when using block-plus-minus plugin * Update package.json * fix(packaging): Don't advertise non-existent ESM entrypoints (#2022) Fixes #1877. Don't advertise module entrypoints on packages that are implemented in TypeScript as at the moment our webpack configuration does not generate any file called src/index.js. * Revert "fix(packaging): Don't advertise non-existent ESM entrypoints (#2022)" This reverts commit 3382ac7. * update package-lock --------- Co-authored-by: Christopher Allen <[email protected]> Co-authored-by: Beka Westberg <[email protected]>
* fix: text join block warning when using block-plus-minus plugin * Update package.json * fix(packaging): Don't advertise non-existent ESM entrypoints (#2022) Fixes #1877. Don't advertise module entrypoints on packages that are implemented in TypeScript as at the moment our webpack configuration does not generate any file called src/index.js. * Revert "fix(packaging): Don't advertise non-existent ESM entrypoints (#2022)" This reverts commit 3382ac7. * update package-lock --------- Co-authored-by: Christopher Allen <[email protected]> Co-authored-by: Beka Westberg <[email protected]>
* fix: text join block warning when using block-plus-minus plugin * Update package.json * fix(packaging): Don't advertise non-existent ESM entrypoints (#2022) Fixes #1877. Don't advertise module entrypoints on packages that are implemented in TypeScript as at the moment our webpack configuration does not generate any file called src/index.js. * Revert "fix(packaging): Don't advertise non-existent ESM entrypoints (#2022)" This reverts commit 3382ac7. * update package-lock --------- Co-authored-by: Christopher Allen <[email protected]> Co-authored-by: Beka Westberg <[email protected]>
Category
Component
Describe the bug
In version 8.0.4, the library cannot be obtained normally through the package manager.
To Reproduce
Expected behavior
In the newly released version 8.0.4, when importing the plugin, an error will be reported that the library does not exist.
Screenshots
Additional context
In
node_modules/@blockly/plugin-workspace-search/package.json
, lines 14 to 16, there is:If changed to the following:
Then it can be used normally again.
The text was updated successfully, but these errors were encountered: