We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Rspack 1.2.5
When an app file to bundle is code-generated like that:
await fs.promises.writeFile( "./src/dynamicFile.js", `export const dynamic = 42`, );
Then Rspack persistent cache will not work as expected: the JS loader will run again on subsequent app compilations.
This also happens when using this.addDependency("./dynamicFile.js")" in a loader.
this.addDependency("./dynamicFile.js")"
This differs from Webpack 5 behavior which will cache the file and skip reloading it.
slorber/rspack-cache-repro#1
Check code on repro/PR: slorber/rspack-cache-repro#1
You can run it with yarn install && yarn test
yarn install && yarn test
Here's the console output printing the extra unwanted loader runs
############################################### # USING WEBPACK ############# ########## Bundle App start - Loading src/entry.js - Loading src/file.js - Loading src/dynamicFile.js Bundle App: 2.146s ########## Bundle App start Bundle App: 5.507ms ########## Bundle App start Bundle App: 4.528ms
############################################### # USING RSPACK ############# ########## Bundle App start - Loading src/entry.js - Loading src/file.js - Loading src/dynamicFile.js Bundle App: 2.032s ########## Bundle App start - Loading src/dynamicFile.js ===========> BAD Bundle App: 1.009s ########## Bundle App start - Loading src/dynamicFile.js ===========> BAD Bundle App: 1.006s
cc @hardfist @jerrykingxyz as requested on Discord
The text was updated successfully, but these errors were encountered:
jerrykingxyz
Successfully merging a pull request may close this issue.
System Info
Rspack 1.2.5
Details
When an app file to bundle is code-generated like that:
Then Rspack persistent cache will not work as expected: the JS loader will run again on subsequent app compilations.
This also happens when using
this.addDependency("./dynamicFile.js")"
in a loader.This differs from Webpack 5 behavior which will cache the file and skip reloading it.
Reproduce link
slorber/rspack-cache-repro#1
Reproduce Steps
Check code on repro/PR: slorber/rspack-cache-repro#1
You can run it with
yarn install && yarn test
Here's the console output printing the extra unwanted loader runs
cc @hardfist @jerrykingxyz as requested on Discord
The text was updated successfully, but these errors were encountered: