Build: Split packages and blocks to their webpack configs.

This also adds support for the viewScript for blocks fixing 
the PDF preview for file blocks.

Props desrosj, gziolo.
See #53397.


git-svn-id: https://develop.svn.wordpress.org/trunk@51259 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Riad Benguella
2021-06-29 15:08:16 +00:00
parent da88164ba5
commit 51cbe7eeb7
9 changed files with 267 additions and 124 deletions

View File

@@ -1,3 +1,4 @@
const blocksConfig = require( './tools/webpack/blocks' );
const mediaConfig = require( './tools/webpack/media' );
const packagesConfig = require( './tools/webpack/packages' );
@@ -11,6 +12,7 @@ module.exports = function( env = { environment: "production", watch: false, buil
}
const config = [
blocksConfig( env ),
mediaConfig( env ),
packagesConfig( env ),
];