Skip to content

Commit

Permalink
Merge pull request #6955 from ampproject/fix/6947-prevent-webpack-fro…
Browse files Browse the repository at this point in the history
…m-copying-php

Revert #6952 and bump `@wordpress/scripts` to 22.1.0
  • Loading branch information
westonruter committed Mar 3, 2022
2 parents ae407f9 + 90902e7 commit 7b7fde8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 41 deletions.
50 changes: 22 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@wordpress/hooks": "3.3.1",
"@wordpress/jest-puppeteer-axe": "4.0.1",
"@wordpress/plugins": "4.1.3",
"@wordpress/scripts": "22.0.1",
"@wordpress/scripts": "22.1.0",
"axios": "0.26.0",
"babel-plugin-inline-react-svg": "2.0.1",
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
Expand Down
13 changes: 1 addition & 12 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,7 @@ const sharedConfig = {
return plugin;
},
)
.filter( ( plugin ) => ! [
'CleanWebpackPlugin',
/**
* After introducing WordPress/gutenberg#38715, PHP files from the `src` folder are copied over
* to the output directory (i.e. `assets`). To prevent this, the `CopyWebpackPlugin` is excluded
* from the plugins list. It is safe since the only other file type the plugin copies is `block.json`
* that is not used in `amp-wp`.
*
* @see https://github.com/ampproject/amp-wp/issues/6947
*/
'CopyWebpackPlugin',
].includes( plugin.constructor.name ) ),
.filter( ( plugin ) => plugin.constructor.name !== 'CleanWebpackPlugin' ),
new RtlCssPlugin( {
filename: '../css/[name]-rtl.css',
} ),
Expand Down

0 comments on commit 7b7fde8

Please sign in to comment.