-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its executiondomain: bundler
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
Static assets ending in .js seem to be modified in a docusaurus build.
Reproducible demo
No response
Steps to reproduce
Create a new Docusaurus project.
npx create-docusaurus@latest my-website classic --typescript
cd my-websiteCreate a static asset containing some JavaScript.
echo "let a = 1; let b = 2;" > ./static/example.jsBuild and serve the project.
npm run build
npm run serveOpen localhost:3000/example.js in your browser and observe that the content served by the browser does not look like the original file anymore, but like this.
let a=1,b=2;This does not happen when renaming the file to use a different extension, such as .txt.
Expected behavior
I would expect Docusaurus not to modify the contents of static .js assets.
Actual behavior
Docusaurus actually transformed the asset.
Your environment
- Docusaurus version used: 3.5.2
- Result of
uname -a: MSYS_NT-10.0-19045 NB01508 3.4.10-2e2ef940.x86_64 2024-07-09 21:35 UTC x86_64 Msys - Environment: Chrome Version 128.0.6613.113 (Official Build) (64-bit)
Self-service
- I'd be willing to fix this bug myself.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its executiondomain: bundler