You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If imported from the default module entry point, rollups says:
rollup v2.63.0
bundles src/js/main.js → _site/js/main.js...
(!) Unresolved dependencies
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
wp (imported by node_modules/@gebruederheitz/wp-block-video-overlay/dist/editor.js)
(!) Missing global variable name
Use output.globals to specify browser global variable names corresponding to external modules
wp (guessing 'wp')
(Which I guess is more a consequence of the tree shaking not working than anything else.)
And, by the way, the same for wp-block-slideshow – need to import { SlideshowFactory } from '@gebruederheitz/wp-block-slideshow/frontend/slideshow-factory'; instead of import { SlideshowFactory } from '@gebruederheitz/wp-block-slideshow';
I'm rather sure this is an issue with the rollup config. Maybe we need to set a name? Is Rollup confused because we have an index.js as well as a src/index.js?
When using the library in a project and importing the frontend factory from the default module entrypoint:
the resulting rollup bundles (both ESM and IIFE) include the backend modules.
Importing the the frontend module directly fixes the issue, but is inconvenient:
The text was updated successfully, but these errors were encountered: