Closed fredrik-lindqvist closed 8 months ago
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 need reproduction
will be closed if no activities in 14 days.
Here is a minimal reproduction.
This issue is related to optimization.minimize
.
rspack-lottie-1.0.0.tgz
@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.
https://github.com/swc-project/swc/issues/8651
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