Skip to content

Commit dccbc2c

Browse files
committed
Webpack ignore the raw module import
1 parent 4f1b380 commit dccbc2c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

projects/packages/jetpack-mu-wpcom/src/features/wpcom-blocks/code/block-definition/block-definition.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,5 +444,7 @@ function htmlEncode( content: string ): string {
444444
.replaceAll( '[', '[' );
445445
}
446446

447-
// eslint-disable-next-line import/no-unresolved -- The feature registers this module for import.
448-
const EditCodeMirror = React.lazy( () => import( '@a8cCodeBlock/block-edit-function' ) );
447+
const EditCodeMirror = React.lazy(
448+
// eslint-disable-next-line import/no-unresolved -- The feature registers this module for import.
449+
() => import( /* webpackIgnore: true */ '@a8cCodeBlock/block-edit-function' )
450+
);

projects/packages/jetpack-mu-wpcom/webpack.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ module.exports = async () => {
126126
},
127127
externals: {
128128
...jetpackWebpackConfig.externals,
129-
'@a8cCodeBlock/block-edit-function': 'import @a8cCodeBlock/block-edit-function',
130129
jetpackConfig: JSON.stringify( {
131130
consumer_slug: 'jetpack-mu-wpcom',
132131
} ),

0 commit comments

Comments
 (0)