Skip to content

Commit 0bea2f7

Browse files
committed
[DevTools] Use a single Webpack config for the extensions
1 parent 2d6d49c commit 0bea2f7

File tree

2 files changed

+9
-136
lines changed

2 files changed

+9
-136
lines changed

packages/react-devtools-extensions/webpack.backend.js

Lines changed: 0 additions & 135 deletions
This file was deleted.

packages/react-devtools-extensions/webpack.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ module.exports = {
5050
mode: __DEV__ ? 'development' : 'production',
5151
devtool: false,
5252
entry: {
53+
backend: './src/backend.js',
5354
background: './src/background/index.js',
5455
backendManager: './src/contentScripts/backendManager.js',
5556
fileFetcher: './src/contentScripts/fileFetcher.js',
@@ -63,7 +64,14 @@ module.exports = {
6364
output: {
6465
path: __dirname + '/build',
6566
publicPath: '/build/',
66-
filename: '[name].js',
67+
filename: chunkData => {
68+
switch (chunkData.chunk.name) {
69+
case 'backend':
70+
return 'react_devtools_backend_compact.js';
71+
default:
72+
return '[name].js';
73+
}
74+
},
6775
chunkFilename: '[name].chunk.js',
6876
},
6977
node: {

0 commit comments

Comments
 (0)