-
Notifications
You must be signed in to change notification settings - Fork 486
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
[Bug]: "asset/resource" module used to handle ".lottie"-animations works in dev-mode but breaks animation-file in production mode #5656
Comments
just downgraded to version 0.5.1 for @rspack/cli and @rspack/core: and then all dotLottie-animations work great in dev and production mode. Also tried version 0.5.2 and then the files break in production. Seems that the files loses their mimetype. |
Same issue. I attempted to address the issue by replacing the JSON path loading method with an inline JSON object(animationData), but the problem persisted. Therefore, I speculate that this issue is unrelated to the assets loader. |
@fredrik-lindqvist Sorry I'm not able to reproduce. Would you please provide a minimal repo? |
Hello @fredrik-lindqvist, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by |
Here is a minimal reproduction. |
@magic-akari thanks for the repo. @h-a-n-a see comment above. |
thanks @magic-akari it seems a swc_ecma_minifier related bug, and i've created an issue for this case. please help with it |
System Info
System:
OS: macOS 14.2.1,
CPU: Apple M2 pro
Memory: 16gb
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.10.0
npm: 10.2.3
Browsers:
Chrome 121.0.6167.160
Safari 17.2.1
npmPackages:
@rspack/cli: 0.5.4
@rspack/core: 0.5.4
@dotlottie/player-component: 1.3.2
react: 18.2.0
react-dom: 18.2.0
Details
To handle import of animations (".lottie"-files ) in my app i use builtin "asset/resource" module. This works great in development mode and all animations are imported correctly. However when I switch to production mode, all imported animations break and can not be loaded correctly. If i switch to webpack 5 (version 5.89.0) all files are loaded correctly in both production and development mode.
Reproduce link
No response
Reproduce Steps
The text was updated successfully, but these errors were encountered: