Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DevTools] Enable hook names in standalone app #22320

Merged
merged 4 commits into from
Sep 17, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Properly build bundle for parseHookNames + rm unintended change in we…
…bpack config
  • Loading branch information
Juan Tejada committed Sep 16, 2021
commit 8a4bf9436d1667e1afbe601737d11fbdeb41ae40
3 changes: 1 addition & 2 deletions packages/react-devtools-core/package.json
Original file line number Diff line number Diff line change
@@ -13,8 +13,7 @@
"dist",
"backend.js",
"build-info.json",
"standalone.js",
"hookNames.js"
"standalone.js"
],
"scripts": {
"build": "yarn build:backend && yarn build:standalone",
4 changes: 3 additions & 1 deletion packages/react-devtools-core/src/standalone.js
Original file line number Diff line number Diff line change
@@ -45,7 +45,9 @@ let statusListener: StatusListener = (message: string) => {};

// TODO (Webpack 5) Hopefully we can remove this prop after the Webpack 5 migration.
function hookNamesModuleLoaderFunction() {
return import('./hookNames');
return import(
/* webpackChunkName: 'parseHookNames' */ 'react-devtools-shared/src/hooks/parseHookNames'
);
}

function setContentDOMNode(value: HTMLElement) {
3 changes: 1 addition & 2 deletions packages/react-devtools-core/webpack.standalone.js
Original file line number Diff line number Diff line change
@@ -38,11 +38,10 @@ const babelOptions = {

module.exports = {
mode: __DEV__ ? 'development' : 'production',
devtool: __DEV__ ? 'cheap-source-map' : 'source-map',
devtool: __DEV__ ? 'cheap-module-eval-source-map' : 'source-map',
target: 'electron-main',
entry: {
standalone: './src/standalone.js',
hookNames: './src/hookNames.js',
},
output: {
path: __dirname + '/dist',