next.js icon indicating copy to clipboard operation
next.js copied to clipboard

swcMinify: true broke SVG path option

Open AstRonin opened this issue 3 years ago • 2 comments

Verify canary release

  • [X] I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Wed Mar 2 00:30:59 UTC 2022
Binaries:
  Node: 19.0.1
  npm: 8.19.2
  Yarn: N/A
  pnpm: N/A
Relevant packages:
  next: 13.0.3
  eslint-config-next: 13.0.2
  react: 18.2.0
  react-dom: 18.2.0

"lottie-web": "5.7.8",

What browser are you using? (if relevant)

Chrome Version 107.0.5304.107 (Official Build) (64-bit)

How are you deploying your application? (if relevant)

next start

Describe the Bug

With swcMinify: true in SVG disappear first latter M. Please look to printscreen.

Error: <path> attribute d: Expected moveto path command ('M' or 'm')

image image

It works fine with swcMinify: false

Expected Behavior

SVG should works fine like without swcMinify.

image

Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

complex

To Reproduce

Using lottie.

export lottie_object from lottie_object.json
lottie.loadAnimation({
  animationData: lottie_object 
})

AstRonin avatar Nov 14 '22 07:11 AstRonin

Same problem! Dev is working fine but build is breaking svg path.

xmahbub avatar Nov 14 '22 12:11 xmahbub

Same issue as #42801

wadehammes avatar Nov 14 '22 14:11 wadehammes

Closing as duplicate of #42801. Please post a reproduction there. "complex" is not a reproduction. We cannot investigate that. :pray:

balazsorban44 avatar Nov 15 '22 17:11 balazsorban44

same issue here, hope this get solved soon

damiano216 avatar Nov 17 '22 13:11 damiano216

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

github-actions[bot] avatar Dec 18 '22 12:12 github-actions[bot]