bobbingwide / sb-children-block

List children of the current content as links.
2 stars 0 forks source link

Update to the latest @wordpress/scripts package and rework as required #15

Closed bobbingwide closed 2 years ago

bobbingwide commented 2 years ago

Having run npm run update-scripts I then tried to build sb-children-block but it failed with

> sb-children-block@1.0.1 dev C:\apache\htdocs\wordpress\wp-content\plugins\sb-children-block
> wp-scripts start

[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
 - configuration.output has an unknown property 'jsonpFunction'. These properties are valid:
   object { assetModuleFilename?, asyncChunks?, auxiliaryComment?, charset?, chunkFilename?, chunkFormat?, chunkLoadTimeout?, chunkLoading?, chunkLoadingGlobal?, clean?, compareBeforeEmit?, crossOriginLoading?, cssChunkFilename?, cssFilename?, devtoolFallbackModuleFilenameTemplate?, devtoolModuleFilenameTemplate?, devtoolNamespace?, enabledChunkLoadingTypes?, enabledLibraryTypes?, enabledWasmLoadingTypes?, environment?, filename?, globalObject?, hashDigest?, hashDigestLength?, hashFunction?, hashSalt?, hotUpdateChunkFilename?, hotUpdateGlobal?, hotUpdateMainFilename?, iife?, importFunctionName?, importMetaName?, library?, libraryExport?, libraryTarget?, module?, path?, pathinfo?, publicPath?, scriptType?, sourceMapFilename?, sourcePrefix?, strictModuleErrorHandling?, strictModuleExceptionHandling?, trustedTypes?, umdNamedDefine?, uniqueName?, wasmLoading?, webassemblyModuleFilename?, workerChunkLoading?, workerWasmLoading? }
   -> Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
   Did you mean output.chunkLoadingGlobal (BREAKING CHANGE since webpack 5)?
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! sb-children-block@1.0.1 dev: `wp-scripts start`
npm ERR! Exit status 2

Looks like I need to follow a similar process to update this plugin as used for oik and other block plugins.

The block is currently delivered with one entry point /build/index.js. wp-scripts has been improved considerably. It now supports multiple blocks per plugin.

Requirement

Process

For plugins which have already been changed refer to the code changes in https://github.com/bobbingwide/sb-starting-block/issues/3 and https://github.com/bobbingwide/oik-bob-bing-wide/issues/42

bobbingwide commented 2 years ago

Fixed in v1.2.0