Skip to content

Commit f451d1b

Browse files
committed
[DevTools] Use a single Webpack config for the extensions
1 parent 290438f commit f451d1b

File tree

3 files changed

+9
-144
lines changed

3 files changed

+9
-144
lines changed

packages/react-devtools-extensions/build.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,6 @@ const build = async (tempPath, manifestPath, envExtension = {}) => {
6666
stdio: 'inherit',
6767
},
6868
);
69-
execSync(
70-
`${webpackPath} --config webpack.backend.js --output-path ${binPath}`,
71-
{
72-
cwd: __dirname,
73-
env: mergedEnv,
74-
stdio: 'inherit',
75-
},
76-
);
7769

7870
// Make temp dir
7971
await ensureDir(zipPath);

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
@@ -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: {

0 commit comments

Comments
 (0)