-
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
Create block: Add support for static assets #28038
Conversation
Size Change: 0 B Total Size: 1.3 MB ℹ️ View Unchanged
|
e8a6bc5
to
edf7a8f
Compare
As commented in #27881 (comment), this is how it can be tested:
|
7556831
to
e720a6d
Compare
@gziolo I tested it and the good news is that the file remained! The bad news is that it was modified. The otf file started with 39 thousand lines and ended with about 48k. These were the exact steps I took:
Now, I don't think the following will be helpful but it probably doesn't hurt to mention: |
@jessynd, thank you for publishing the updated package to npm. I should do it myself yesterday 😅 On the bright side, now I can use your template to do some testing. I can reproduce the issue so now I have a straightforward part for fixing it. |
I got it working with the The fix was super simple: 1e8d29a, haha |
e720a6d
to
1e8d29a
Compare
Yay!!!! This is so exciting! I will test it again myself today. |
I'm super excited about this change in tandem with the changes to the default @jessynd, thank you a lot for your invaluable help to make it happen! |
Description
Related to #27881. The issue was described by @jessynd as follows:
This PR add support for handling static assets with the
assetsPath
field in the external template configuration.assetsPath
This setting is useful when your template scaffolds a block that uses static assets like images or fonts, which should not be processed. It provides the path pointing to the location where assets are located.
Example:
How has this been tested?
It requires a 3rd party template for testing. I tested locally with tweaking the local template, but we need to validate with a package published to npm as follows:
npx wp-create-block --template name-of-the-template
Types of changes
New feature (non-breaking change which adds functionality).
Checklist: