-
Notifications
You must be signed in to change notification settings - Fork 5
Add .js to the bundle filename
#68
Conversation
|
I don't think it matters, but can you test that the runtime still works with this change? |
calavera
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed this changes with the manifest loader, and they should work as expected. My only comment is that the value in the SHA field is not a sha anymore.
| /** @type {import("./upload").BundleInfo} */ | ||
| const bundleInfo = { | ||
| sha: shasum.digest("hex"), | ||
| sha: `${shasum.digest("hex")}.js`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we change this to not be named sha, since it has an extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can change it. How would you like it to be named?
I am assuming this would require changes in both Netlify Dev and the manifest loader though?
|
can we put it on hold for now? i think the |
|
Sounds good. It looks like this would be create more problems than it would solve, so I am closing this for now 👍 |
Fixes #49.
This appends
.jsto the bundle filename.On one hand, the bundle is merely an implementation detail, so we might want to keep it opaque.
On the other hand, many tools depends on knowing a file format using the file extension, so this might be a good practice. For example, when debugging a bundle, this would allow syntax highlighting in text editors and IDEs.