Fixes for @woocommerce/dependency-extraction-webpack-plugin (https://github.com/woocommerce/woocommerce-admin/pull/6295)
* switch block-settings alias to settings and fix mapped external * don’t force compilation of externals to `this` scope. * update various meta data in package related files (changelog etc) * update starter pack Co-authored-by: Paul Sealock <psealock@gmail.com>
This commit is contained in:
parent
84089c42fc
commit
4cd14f5137
|
@ -22,6 +22,6 @@
|
|||
"devDependencies": {
|
||||
"@wordpress/scripts": "^12.2.1",
|
||||
"@woocommerce/eslint-plugin": "1.1.0",
|
||||
"@woocommerce/dependency-extraction-webpack-plugin": "1.2.0"
|
||||
"@woocommerce/dependency-extraction-webpack-plugin": "1.3.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# 1.3.0
|
||||
|
||||
- Remove `@woocommerce/block-settings` from internal maps and use `@woocommerce/settings` instead. This external exposes the `getSetting` API interface which encourages read only use of the global.
|
||||
- Remove explicitly scoping externals to `this`. The plugin compiler will take care of scoping the external to the correct context and `this` is not correct in some contexts consuming this package.
|
||||
# 1.2.0
|
||||
|
||||
- Add WooCommerce Blocks Dependencies. #6228
|
||||
|
@ -8,7 +12,7 @@
|
|||
|
||||
# 1.0.1
|
||||
|
||||
- Fix: Avoid tanspiling packaged code.
|
||||
- Fix: Avoid transpiling packaged code.
|
||||
|
||||
# 1.0.0
|
||||
|
||||
|
|
|
@ -31,5 +31,5 @@ Additional module requests on top of Wordpress [Dependency Extraction Webpack Pl
|
|||
| `@woocommerce/data` | `wc['data']` | `wc-store-data` |
|
||||
| `@woocommerce/csv-export` | `wc['csvExport']` | `wc-csv` |
|
||||
| `@woocommerce/blocks-registry` | `wc['wcBlocksRegistry']` | `wc-blocks-registry` |
|
||||
| `@woocommerce/blocks-settings` | `wc['wcSettings']` | `wc-blocks-settings` |
|
||||
| `@woocommerce/settings` | `wc['wcSettings']` | `wc-settings` |
|
||||
| `@woocommerce/*` | `wc['*']` | `wc-*` |
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@woocommerce/dependency-extraction-webpack-plugin",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"description": "WooCommerce Dependency Extraction Webpack Plugin",
|
||||
"author": "Automattic",
|
||||
"license": "GPL-2.0-or-later",
|
||||
|
|
|
@ -22,7 +22,7 @@ const wooRequestToExternal = ( request ) => {
|
|||
const handle = request.substring( WOOCOMMERCE_NAMESPACE.length );
|
||||
const irregularExternalMap = {
|
||||
'blocks-registry': [ 'wc', 'wcBlocksRegistry' ],
|
||||
'blocks-settings': [ 'wcSettings' ],
|
||||
settings: [ 'wc', 'wcSettings' ],
|
||||
};
|
||||
|
||||
const excludedExternals = [ 'experimental' ];
|
||||
|
@ -74,7 +74,7 @@ class DependencyExtractionWebpackPlugin extends WPDependencyExtractionWebpackPlu
|
|||
if ( externalRequest ) {
|
||||
this.externalizedDeps.add( request );
|
||||
|
||||
return callback( null, { this: externalRequest } );
|
||||
return callback( null, externalRequest );
|
||||
}
|
||||
|
||||
// Fall back to the WP method
|
||||
|
|
Loading…
Reference in New Issue