-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 the webpack shortcode config #14485
Conversation
Hm, does that fix it for you? I still have the same error on this branch. |
@ellatrix make sure to re-run |
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.
@youknowriad Ah, stupid of me. :) It works, but why is this not on for all modules? Any way this can be automatic so we cannot make the same mistake with other packages?
It adds this For reference, a package which doesn't use
Something like this might work as well:
|
@gziolo That would be great! |
Yes, @aduth made a good point last week. We should optimize the code to avoid any lists of exceptions for packages. I removed one of them from Jest config last week. That should be the next one to fix. |
I'm still curious why this would have suddenly become a regression, if |
Is it possible that we're running into a conflict between the two versions of |
I'd think it's the opposite. Both scripts supposed to have the exact same API (copy/paste). I think we may have never loaded the Gutenberg shortcode script and started doing so recently. |
@youknowriad Right, I could imagine that being the case. If they're meant to be drop-in replaceable, then I imagine it shouldn't be an issue, but worth keeping an eye on further possible regressions. It makes me wonder if we couldn't also just replace the existing script from core with this new one, if it behaves the same (i.e. keep |
@aduth Right!, I had a patch at some point, worth revisiting https://core.trac.wordpress.org/ticket/44987 |
closes #14436
The shortcode script has a default export, which means it should be included in the
LibraryExportDefaultPlugin
webpack config.