Fix loading opt-in block metadata

Build version of plugin doesn't contain assets/js folder.
We need to copy block.json file with the metadata to assets/dist directory and load it from there.
[MAILPOET-3920]
This commit is contained in:
Rostislav Wolny
2021-11-18 14:07:09 +01:00
committed by Veljko V
parent e9202d840a
commit ae33ab8d82
2 changed files with 9 additions and 1 deletions

View File

@@ -488,6 +488,14 @@ const marketingOptinBlock = Object.assign({}, wpScriptConfig, {
requestToExternal,
requestToHandle,
}),
new WebpackCopyPlugin({
patterns: [
{
from: 'assets/js/src/marketing_optin_block/block.json',
to: 'block.json',
},
],
}),
],
});