Skip to content

Break indentation in template literals #17

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

Open
fenprace opened this issue Nov 18, 2024 · 0 comments
Open

Break indentation in template literals #17

fenprace opened this issue Nov 18, 2024 · 0 comments

Comments

@fenprace
Copy link

Check here for an actual reproduction: https://stackblitz.com/edit/vitejs-vite-ztyhgr?file=src%2Fmain.tsx

I got different outputs for the following input, with or without vite-plugin-conditional-compiler:

const GQL_QUERY = `
  query {
    countries {
      code
      name
      emoji
    }
  }
`;

I got this without vite-plugin-conditional-compiler:
image

And this is what I got with vite-plugin-conditional-compiler, note the indentation was removed after compiling:
image

Versions:

  • node: 18.20.5
  • vite: 5.4.11
  • vite-plugin-conditional-compiler: 0.3.1
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