Skip to content

Commit

Permalink
Update tools/webpack/packages.js
Browse files Browse the repository at this point in the history
Co-authored-by: Aki Hamano <[email protected]>
  • Loading branch information
torounit and t-hamano authored Sep 8, 2023
1 parent 6fa1f82 commit 4baf491
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/webpack/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ module.exports = {
filename: './build/[name]/index.min.js',
path: join( __dirname, '..', '..' ),
devtoolModuleFilenameTemplate: ( info ) => {
if ( info.resourcePath.includes( '@wordpress' ) ) {
if ( info.resourcePath.includes( '/@wordpress/' ) ) {
const resourcePath =
info.resourcePath.split( '@wordpress' )[ 1 ];
info.resourcePath.split( '/@wordpress/' )[ 1 ];
return `../../packages/${ resourcePath }`;
}
return `webpack://${ info.namespace }/${ info.resourcePath }`;
Expand Down

0 comments on commit 4baf491

Please sign in to comment.