Skip to content

Please provide Gutenberg-ready example in docs #18

Description

@paulgibbs

Hi @kadamwhite

I've been using asset-loader on the last few projects I've worked on, and alongside the webpack helpers package, really enjoy the developer experience when it all works, so kudos to you for putting that together.

An area where I consistently struggle with, and waste a surprising amount of time on, is the new project initial set-up, where I might set up all the build tools etc so it's ready to go for the rest of my dev teams.

It'd be really valuable if, at least, there were docs that explained how to make the most of asset-loader for a typical plugin that adds a Gutenberg block(s). I'm sure you'd agree there's some community best practise for the file layout of a Gutenberg block, such as potentially different CSS for the front-end vs the Gutenberg editor, and I always struggle getting that kind of structure to work with asset-loader.

I think some sample code that I could copy/paste in to a project as a starting point would shave down dramatically some of the time.

I get there in the end, but I'd estimate it takes me 1 to 1.5 days to get asset-loader set-up on a new project (for blocks, and for eslint etc), and I'd love to see that come down. Much of the time is spent debugging the PHP and understanding why it's not working.
(For example, I know the second parameter of autoregister() etc needs to match the "entry" object name in the Webpack config, but I seem to have to re-discover that myself for each new project.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationContains notes which should be added to public-facing documentation

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions