Skip to content

Commit

Permalink
Try using DEWP for interactivity build
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Dec 26, 2023
1 parent 4924a9b commit 96283c8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tools/webpack/interactivity.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
const { join } = require( 'path' );
const CopyWebpackPlugin = require( 'copy-webpack-plugin' );

/**
* WordPress dependencies
*/
const DependencyExtractionWebpackPlugin = require( '@wordpress/dependency-extraction-webpack-plugin' );

/**
* Internal dependencies
*/
Expand All @@ -30,12 +35,9 @@ module.exports = {
type: 'module',
},
path: join( __dirname, '..', '..' ),
module: true,
environment: { module: true },
},
externalsType: 'module',
externals: {
'@wordpress/interactivity': '@wordpress/interactivity',
},
resolve: {
extensions: [ '.js', '.ts', '.tsx' ],
},
Expand Down Expand Up @@ -79,6 +81,8 @@ module.exports = {
},
],
} ),

new DependencyExtractionWebpackPlugin(),
],
watchOptions: {
ignored: [ '**/node_modules' ],
Expand Down

0 comments on commit 96283c8

Please sign in to comment.