The source of @woocommerce/settings
processed by DEWP is confusing #7810
Description
Describe the bug
As a plugin developer, I tried to use Dependency Extraction Webpack Plugin to use a package to obtain the WooCommerce settings. (woocommerce/pinterest-for-woocommerce#224, woocommerce/google-listings-and-ads#1050)
I checked that wc.wcSettings
delivers the data I need. So I checked the README of DEWP to check which plugin I should actually import in my local package.json
, and which package I should inspect to check its API and behavior. README states:
Request Global Script handle @woocommerce/settings
wc['wcSettings']
wc-settings
But the thing is, it's not the @woocommerce/settings
. It is wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/wc-settings.js
Which AFAIK is not published anywhere, therefore, could not even be my plugins dependency.
To Reproduce
- Install and setup Woo DEWP on your plugin repo.
- Add
import foo from @woocommerce/settings
- Install locally
npm install --save @woocommerce/settings
- Run unit tests
Actual behavior:
The local @woocommerce/settings
package is different than externalized.
Screenshots
Expected behavior
The README points to the exact package that would be externalized.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]