File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
public_html/wp-content/plugins/pattern-creator Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,6 @@ function pattern_creator_init() {
182182 'after '
183183 );
184184
185- wp_enqueue_script ( 'wp-edit-site ' );
186185 wp_enqueue_script ( 'wp-format-library ' );
187186 wp_enqueue_style ( 'wp-edit-site ' );
188187 wp_enqueue_style ( 'wp-format-library ' );
Original file line number Diff line number Diff line change 11const defaultConfig = require ( '@wordpress/scripts/config/webpack.config' ) ;
2+ const DependencyExtractionWebpackPlugin = require ( '@wordpress/dependency-extraction-webpack-plugin' ) ;
23
34const config = {
45 ...defaultConfig ,
@@ -7,6 +8,25 @@ const config = {
78 library : [ 'wp' , 'patternCreator' ] ,
89 libraryTarget : 'window' ,
910 } ,
11+
12+ plugins : [
13+ ...defaultConfig . plugins . filter (
14+ ( plugin ) => plugin . constructor . name !== 'DependencyExtractionWebpackPlugin'
15+ ) ,
16+ new DependencyExtractionWebpackPlugin ( {
17+ requestToExternal ( request ) {
18+ if (
19+ request === '@wordpress/editor' ||
20+ request === '@wordpress/icons' ||
21+ request === '@wordpress/interface' ||
22+ request === '@wordpress/fields' ||
23+ request === '@wordpress/dataviews'
24+ ) {
25+ return false ;
26+ }
27+ } ,
28+ } ) ,
29+ ] ,
1030} ;
1131
1232module . exports = config ;
You can’t perform that action at this time.
0 commit comments