Skip to content

Commit 7789f02

Browse files
committed
Removed the copy-webpack-plugin as we simply use a script now to copy assets.
1 parent 4b3e192 commit 7789f02

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"@wordpress/primitives": "^4.7.0",
4848
"@wordpress/scripts": "^29.0.0",
4949
"classnames": "^2.5.1",
50-
"copy-webpack-plugin": "^12.0.2",
5150
"globby": "^14.0.2",
5251
"gulp": "^5.0.0",
5352
"gulp-freemius-deploy": "^1.0.11",

src/DEV.md

-1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,5 @@ This project extends the default `@wordpress/scripts/config/webpack.config` to p
9090
`frontend` scripts based on there include path.
9191
3. Configure the `@wordpress/dependency-extraction-webpack-plugin` to handle the `editor` and `frontend` scripts.
9292
4. Add `raw-loader` to the default `module.rules` and configure it to import `.html` files.
93-
5. Add `copy-webpack-plugin` to the default `plugins` and configure it to copy the `src/media` folder to the `assets` folder.
9493

9594
**_Note:_** Check the comments in the file for more detailed explanations of the above.

webpack.config.js

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
33
const DependencyExtractionWebpackPlugin = require( '@wordpress/dependency-extraction-webpack-plugin' );
4-
const CopyPlugin = require( 'copy-webpack-plugin' );
54

65
/**
76
* Modify the default WordPress config entry points to include our internal packages '#editor' and '#frontend' that are
@@ -109,14 +108,6 @@ module.exports = {
109108
// CopyPlugin to allow simple copying of files within the media folder.
110109
plugins: [
111110
...defaultConfig.plugins.filter( plugin => plugin.constructor.name !== 'DependencyExtractionWebpackPlugin' ),
112-
!process.env.WP_NO_EXTERNALS && new DependencyExtractionWebpackPlugin( dependencyExtractionWebpackPluginOptions ),
113-
new CopyPlugin( {
114-
patterns: [ {
115-
context: './src/media',
116-
from: '*.*',
117-
to: 'media/[name][ext]',
118-
noErrorOnMissing: true
119-
} ]
120-
} )
111+
!process.env.WP_NO_EXTERNALS && new DependencyExtractionWebpackPlugin( dependencyExtractionWebpackPluginOptions )
121112
].filter( Boolean )
122113
};

0 commit comments

Comments
 (0)