I wonder if, instead of copying the compiled css directly we pull in @wordpress/block-library which is a npm package and potentially @wordpress/base-styles (which I think would be needed) and compile all the style.scss
files within each core block into something we load through the @frontity/gutenberg
package.
Both of these packages would be dev dependencies.
For reference, this is how Gutenberg compiles its css: https://github.com/WordPress/gutenberg/blob/master/webpack.config.js#L122
That’s a great idea @nicholasio.oliveira, thanks. I was not aware of this npm package. We can include a build step to compile the scss
files from that package and avoid the copy/paste.
I guess we’d still need to do that build manually and release multiple versions of our package to be able to support old WP and Gutenberg plugin versions, but yes, it seems feasible
This will be useful to create different versions of the package that match the different versions of WP/Gutenberg: https://developer.wordpress.org/block-editor/principles/versions-in-wordpress/