WebDevStudios / wds-block-starter

A block starter for projects.
15 stars 3 forks source link

Abstract custom webpack configuration into an npm package #4

Closed michealengland closed 4 years ago

michealengland commented 4 years ago

Abstract custom webpack configuration into an npm package

It would be a huge improvement abstract additional Webpack configuration that is extending WP Scripts into an NPM Package. This way each plugin that is created with the wds-block-starter can access the latest updates that are being applied to the tooling.

About the Tooling

Currently this plugin uses WP Scripts as a starting place for tooling, then we're providing our own webpack.config.js which adds extra features on top of the WP Script defaults.

donmhico commented 4 years ago

I'm interested in this, however i'm not entirely sure I understand what this issue meant. @michealengland @aubreypwd - If you have the time can you explain further?

In issue #24, I created an NPM package that scaffolds wds-block-starter, I felt that it might be related to this ticket.

Reference: https://github.com/donmhico/create-wds-block https://www.npmjs.com/package/@donmhico/create-wds-block

michealengland commented 4 years ago

@donmhico Sure, I can try to explain a little deeper.

As we add more updates to our Block Starter and make improvements on tooling, it would be nice to abstract webpack.config.js and postcss.config-.js into a WDS NPM package. This way older plugins can just update a package rather than being required to manually update files such as webpack.config.js as new updates are available.

For example, when Webpack 5 is released, breaking changes will be introduced into the plugin. This means that any plugins using the WDS Block Starter will require manually updating webpack.config.js in order to get the improvements that will be added in the latest version of the WDSBlock Starter plugin.

Requirements

michealengland commented 4 years ago

After recent updates to WP Scripts 12, I think that we can close this issue. We no longer need the work-around after https://github.com/WebDevStudios/wds-block-starter/pull/35 and the Webpack config is simple enough that we don't need to extract anything else.