@@ -66,6 +66,7 @@ module.exports = {
6666 mode : __DEV__ ? 'development' : 'production' ,
6767 devtool : false ,
6868 entry : {
69+ backend : './src/backend.js' ,
6970 background : './src/background/index.js' ,
7071 backendManager : './src/contentScripts/backendManager.js' ,
7172 fileFetcher : './src/contentScripts/fileFetcher.js' ,
@@ -79,7 +80,14 @@ module.exports = {
7980 output : {
8081 path : __dirname + '/build' ,
8182 publicPath : '/build/' ,
82- filename : '[name].js' ,
83+ filename : chunkData => {
84+ switch ( chunkData . chunk . name ) {
85+ case 'backend' :
86+ return 'react_devtools_backend_compact.js' ;
87+ default :
88+ return '[name].js' ;
89+ }
90+ } ,
8391 chunkFilename : '[name].chunk.js' ,
8492 } ,
8593 node : {
@@ -141,7 +149,7 @@ module.exports = {
141149 } ) ,
142150 new Webpack . SourceMapDevToolPlugin ( {
143151 filename : '[file].map' ,
144- include : 'installHook.js' ,
152+ include : [ 'installHook.js' , 'react_devtools_backend_compact.js' ] ,
145153 noSources : ! __DEV__ ,
146154 // https://github.com/webpack/webpack/issues/3603#issuecomment-1743147144
147155 moduleFilenameTemplate ( info ) {
@@ -163,6 +171,7 @@ module.exports = {
163171 }
164172
165173 const contentScriptNamesToIgnoreList = [
174+ 'react_devtools_backend_compact' ,
166175 // This is where we override console
167176 'installHook' ,
168177 ] ;
0 commit comments