Skip to content

[Bug] autoCodeSplitting encodes chinese chars in production #3183

Closed

Description

@coldsmirk

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

Activity

  1. added a commit that references this issue on Jan 18, 2025
    40dd906
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions