File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,18 @@ const sharedConfig = {
5050 return plugin ;
5151 } ,
5252 )
53- . filter ( ( plugin ) => plugin . constructor . name !== 'CleanWebpackPlugin' ) ,
53+ . filter ( ( plugin ) => ! [
54+ 'CleanWebpackPlugin' ,
55+ /**
56+ * After introducing WordPress/gutenberg#38715, PHP files from the `src` folder are copied over
57+ * to the output directory (i.e. `assets`). To prevent this, the `CopyWebpackPlugin` is excluded
58+ * from the plugins list. It is safe since the only other file type the plugin copies is `block.json`
59+ * that is not used in `amp-wp`.
60+ *
61+ * @see https://github.com/ampproject/amp-wp/issues/6947
62+ */
63+ 'CopyWebpackPlugin' ,
64+ ] . includes ( plugin . constructor . name ) ) ,
5465 new RtlCssPlugin ( {
5566 filename : '../css/[name]-rtl.css' ,
5667 } ) ,
You can’t perform that action at this time.
0 commit comments