kucrut / vite-for-wp

Vite integration for WordPress plugins and themes development.
GNU General Public License v2.0
260 stars 29 forks source link

Just one missing piece for a perfect solution - Dependency extraction #73

Open irshadahmad21 opened 1 year ago

irshadahmad21 commented 1 year ago

Thank you for this tool. It's amazing!

For webpack WP has a plugin dependency-extraction-webpack-plugin that bundles all the WP dependencies that are loaded externally.

Here is the related discussion on Vite repo: https://github.com/vitejs/vite/discussions/9411

Could we have that missing piece?

I am ready to help build such a feature, but unfortunately, I am not an expert on the build tools.

kucrut commented 5 months ago

The Webpack dependency extraction plugin has two purposes. The first one is already possible with this plugin (see README), and the second one is mainly for developing custom blocks.

I have a WIP branch that solves the second issue. It should be released when ready (hopefully soon enough).