-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
JS hash changes when src folder moved #3416
Comments
Interesting point. My feeling is that implementing the improved hashing I outlined in #2872 (comment) might solve this as well, definitely worth keeping as a test case for a new algorithm. |
I don't know if related, but I was hitting the same kind of issue with webpack, and the problem was that a loader (plugin) transforming an import request used absolute disk path of the file as an internal import identifier (relying on |
It is worth mentioning that the bug only exists with code splitting configurations when input: [`src${num}/index.js`, `src${num}/profile.js`] Obviously if rollup builds each of these files separately : // rolllup.config.js
export default ["index.js", "profile.js"].reduce((config, file) => {
[1, 2].forEach((num) => {
config.push({
input: `src${num}/${file}`,
output: {
entryFileNames: "[name]-[hash].js",
dir: "build/" + num,
format: "esm",
},
});
});
return config;
}, []); the hash names remain the same for each source folder. Maybe a "code splitting" label should be added ? |
Fix finally at #4543 |
1 similar comment
Fix finally at #4543 |
This issue has been resolved via #4543 as part of rollup@3.0.0-7. Note that this is a pre-release, so to test it, you need to install Rollup via |
This issue has been resolved via #4543 as part of rollup@3.0.0-8. Note that this is a pre-release, so to test it, you need to install Rollup via |
This issue has been resolved via #4543 as part of rollup@3.0.0. You can test it via |
Expected Behavior
The two
src
folders have identical contents, their output filenames should not differ between builds.Actual Behavior
All three files change hash.
#2839 may be related.
The text was updated successfully, but these errors were encountered: