-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Hide component path in componentChunkName #18791
Comments
+1 |
Just discussed with @pvdz @pieh and @m-allanson and we're unsure if this is a good default to have. While we see the value in obfuscation, debugability is important to DX in general and human readable names should be preferred over hashes. We'd like to avoid adding (yet another) config option to toggle this because that's an obligation to maintain. Let's hear what other folks have to say and we'll move forward accordingly. Thank you for bringing this up! |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Thanks again for being part of the Gatsby community! 💪💜 |
+1 Is this still a possibility? The chunk names in the |
+1 Just would like to add that having the chunk names (acting as essentially a sitemap) visible in the source is not ideal. Would love to have some way to obfuscate these if possible. We use gatsby for making landing pages for example so there is not a lot of linking between the pages we generate. But competitors or anyone else can see more of our pages than we'd like if they cared to look. Thanks. |
Summary
Currently, the component path is exposed publicly via
window.___chunkMapping
:I recently saw this SO question link & I think it's reasonable to hide these path, maybe only in production build.
Upon a bit of search, I found that the code here is responsible for generating:
gatsby/packages/gatsby/src/utils/js-chunk-names.js
Lines 11 to 12 in f59ba15
I tested my idea with
uuidv5
:All local unit tests passed & the site I tested this on seems to perform as expected.
What do you think? Should the component path in componentChunkName be hidden?
The text was updated successfully, but these errors were encountered: