-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Markdown links linking to JS files should resolve to the asset url, not transpiled code #10855
Comments
Hi, this is working as expected. The static folder doesn't mean "no bundling"; it just means it will be copied to the output folder. You can use |
@Josh-Cena Thank you for pointing this out to me! I didn't notice that. Great! |
Hmm, I'm not so sure in this case. Markdown links referencing files are converted to When it's used inside a Markdown links, returning the transpiled module has no utility at all IMHO, and we should probably use webpack file-loader in this case.
Note: this is unrelated to #10460 |
So your opinion is that it should still go through the bundler and get hashed, just should use file-loader instead of js-loader? That makes sense to me. |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
Something similar to #10460
Reproducible demo
No response
Steps to reproduce
This is simple to reproduce.
static/assets/upload/test.js
:This will break a build (rspack also).
It looks like #10460.
If the ‘invalid’ JavaScript is in the folder, but there is no reference to it, everything will build correctly.
Expected behavior
Documentation is built even if there is a reference to an invalid JavaScript file in static assets.
Actual behavior
Your environment
docusaurus 3.7.0
node 20.17.0
npm 10.8.2
Self-service
The text was updated successfully, but these errors were encountered: