Skip to content
Source
Sign inSign up
TanStack/router

[Bug] autoCodeSplitting encodes chinese chars in production #3183

Send to my agent
Closedcoldsmirk(GitHub profile, opens in a new tab) opened this issue 0 comments

Which project does this relate to?

Router

Describe the bug

Chinese characters are converted to Unicode encoding after the build, which does not meet expectations.

Your Example Website or App

https://stackblitz.com/edit/tanstack-router-pbcifh3r?file=src%2Froutes%2Findex.tsx

Steps to Reproduce the Bug or Issue

  1. Go to the reproduction link page
  2. Open the terminal and execute npm run dev
  3. You can see the result correctly shows a line of Chinese text and a line of English text
  4. Open the terminal again, stop the previous command, and execute npm run build
  5. After the build is complete, run npm run preview to view the result again, and you will find that the Chinese text has been encoded into Unicode characters

Note, this issue was reproduced with the autoCodeSplitting: true option configured in the routing plugin.

Expected behavior

As a user, I expect the interface to display the results as normal Unicode text, rather than encoded characters.

Screenshots or Videos

No response

Platform

  • OS: [macOS]
  • Browser: [Chrome]
  • Version: [1.97.1]

Additional context

No response

Sign in to join this conversation.