-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Scripts: Problem with build command when using multiple blocks scaffolded with create block #27969
Comments
@skorasaurus, thank you for cross linking with existing issues. It's very likely it's the same bug with webpack v4 that was fixed in webpack v5. I tried today to upgrade |
@S-Blank have you tried the solution as explained here: #23607 (comment) |
I have, as described in #23607 (comment), added a webpack.config.js with the following code in all my blocks. Now it works for me. Thank you very much for your help. |
The fix is almost ready to land in #27985, thank you for confirming that it solve the issue for you :) |
Good day,
I have been having problems developing Gutenberg blocks for days.
I use ‘@wordpress/create-block’ to build my blocks. As long as I build the blocks with ‘npm start’, the blocks work fine and without any error messages, but as soon as I use ‘npm run build’ for building, I get problems, especially if other custom blocks of mine are already installed (the new block or other blocks can no longer be found in the editor, or throw an error message: ‘Object(…) is not a function at anonymus’). Sometimes renaming the new block and clearing the browser cache / website cache helps, sometimes not.
If I then build the block again via ‘npm start’, everything works again.
Does anyone have an idea what this could be?
Many thanks in advance for your help.
Many greetings
Simon
The text was updated successfully, but these errors were encountered: