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

Fixed issue for better bundles,chunks and workers name in devtools-extensions. #22322

Merged
merged 1 commit into from
Sep 15, 2021
Merged

Conversation

akgupta0777
Copy link
Contributor

Summary

This Pull request fixes #22115

How did you test this change?

ran yarn test:chrome

Demonstration of the proposed changes

Using magic comments on dynamic imports fixes the chunk names properly.
For workers I added a name property to the workerize-loader in webpack.config.js

Result

Now the files after building devtools-extensions are as follows.
image

@akgupta0777
Copy link
Contributor Author

@bvaughn I ran all the tests locally they passed all but here are failing. Can you help me.

@bvaughn
Copy link
Contributor

bvaughn commented Sep 15, 2021

@akgupta0777 Unfortunately the way our Npm cache is implemented is pretty flaky in CI right now. Those failures aren't test related, and I've restarted them.

@akgupta0777
Copy link
Contributor Author

akgupta0777 commented Sep 15, 2021

Thanks @bvaughn for the reason , Please review my work.

@akgupta0777 akgupta0777 changed the title Fixed issue of better bundles,chunks and workers name in devtools-ext… Fixed issue for better bundles,chunks and workers name in devtools-extensions. Sep 15, 2021
@bvaughn bvaughn self-assigned this Sep 15, 2021
@bvaughn bvaughn self-requested a review September 15, 2021 17:41
Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does fix the file names. I can confirm by:

# packages/react-devtools-extensions

$ rm -rf chrome/build

$ yarn build:chrome

$ ls -l chrome/build/unpacked/build

-rw-r--r--  1 bvaughn  staff     8112 Sep 15 13:42 background.js
-rw-r--r--  1 bvaughn  staff     5345 Sep 15 13:42 contentScript.js
-rw-r--r--  1 bvaughn  staff   305003 Sep 15 13:42 importFile.worker.worker.js
-rw-r--r--  1 bvaughn  staff   343161 Sep 15 13:42 injectGlobalHook.js
-rw-r--r--  1 bvaughn  staff  2172594 Sep 15 13:42 main.js
-rw-r--r--  1 bvaughn  staff     4293 Sep 15 13:42 panel.js
-rw-r--r--  1 bvaughn  staff  2712294 Sep 15 13:42 parseHookNames.chunk.js
-rw-r--r--  1 bvaughn  staff  2560010 Sep 15 13:42 parseSourceAndMetadata.worker.worker.js
-rw-r--r--  1 bvaughn  staff   440919 Sep 15 13:42 react_devtools_backend.js
-rw-r--r--  1 bvaughn  staff   320673 Sep 15 13:42 renderer.js
-rw-r--r--  1 bvaughn  staff    55301 Sep 15 13:42 vendors~parseHookNames.chunk.js

@bvaughn
Copy link
Contributor

bvaughn commented Sep 15, 2021

Thank you!

@bvaughn bvaughn merged commit e8feb11 into facebook:main Sep 15, 2021
zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DevTools: Better Bundle Names for Dynamically Imported Modules
3 participants