Skip to content
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

Mix removes SVG information in production #3363

Open
ageir opened this issue Jun 17, 2023 · 0 comments
Open

Mix removes SVG information in production #3363

ageir opened this issue Jun 17, 2023 · 0 comments

Comments

@ageir
Copy link

ageir commented Jun 17, 2023

  • Laravel Mix Version: 6.0.49
  • Node Version v14.19.1:
  • NPM Version 9.7.1:
  • OS: Ubuntu

Description:

CSS with SVG is removed when running production.

Original CSS:

body { background-image: url("data:image/svg+xml,<svg id='patternId' width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='69.141' height='40' patternTransform='scale(0.75) rotate(45)'><rect x='0' y='0' width='100%' height='100%' fill='hsla(0,0%,100%,1)'/><path d='M69.212 40H46.118L34.57 20 46.118 0h23.094l11.547 20zM57.665 60H34.57L23.023 40 34.57 20h23.095l11.547 20zm0-40H34.57L23.023 0 34.57-20h23.095L69.212 0zM34.57 60H11.476L-.07 40l11.547-20h23.095l11.547 20zm0-40H11.476L-.07 0l11.547-20h23.095L46.118 0zM23.023 40H-.07l-11.547-20L-.07 0h23.094L34.57 20z' stroke-width='1' stroke='hsla(46, 100%, 38%, 0.28)' fill='none'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>"); }

After mix production:

body { background-image: url(data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><rect width="800%" height="800%" fill="url(%23a)"/></svg>); }

Is there a setting so that mix won't remove the SVG information? Or is this a bug in mix?

Steps To Reproduce:

Running npx mix --production removes the SVG code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant