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

[Bug]: missing quotation mark when use asciiOnly format in rspack 0.4.0-canary #4797

Closed
9aoy opened this issue Nov 28, 2023 · 0 comments · Fixed by #4824
Closed

[Bug]: missing quotation mark when use asciiOnly format in rspack 0.4.0-canary #4797

9aoy opened this issue Nov 28, 2023 · 0 comments · Fixed by #4824
Assignees
Labels
bug Something isn't working pending triage The issue/PR is currently untouched. team The issue/pr is created by the member of Rspack. urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority)

Comments

@9aoy
Copy link
Collaborator

9aoy commented Nov 28, 2023

System Info

System:
OS: macOS 12.5.1
CPU: (10) arm64 Apple M1 Pro
Memory: 92.39 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.18.2 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 9.8.1 - /usr/local/bin/npm
pnpm: 7.29.1 - /usr/local/bin/pnpm
Browsers:
Chrome: 119.0.6045.159
Safari: 15.6.1
npmPackages:
@rspack/cli: 0.4.0-canary-d45e3e0-20231128075052 => 0.4.0-canary-d45e3e0-20231128075052
@rspack/core: 0.4.0-canary-d45e3e0-20231128075052 => 0.4.0-canary-d45e3e0-20231128075052

Details

charset format error:

image

input code:

window.b = {
  Д: "A",
  Å: "A",
  Ð: "D",
  Þ: "o",
  å: "a",
  ð: "d",
  þ: "o",
  𝒩: "a",
};

expect output:

window.b = {
    "\u0414": "A",
    "\xc5": "A",
    "\xd0": "D",
    "\xde": "o",
    "\xe5": "a",
    "\xf0": "d",
    "\xfe": "o",
    "\uD835\uDCA9": "a"
};

actually:

window.b = {
    "\u0414": "A",
    "\xc5": "A",
    "\xd0": "D",
    "\xde": "o",
    "\xe5": "a",
    "\xf0": "d",
    "\xfe": "o",
    \uD835\uDCA9: "a" // missing quotation mark
};

Reproduce link

https://github.com/9aoy/rspack-issue-reproduce/tree/main/rspack-charset

Reproduce Steps

  1. pnpm install
  2. pnpm build
  3. open dist/main.js
image
@9aoy 9aoy added bug Something isn't working pending triage The issue/PR is currently untouched. labels Nov 28, 2023
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Nov 28, 2023
@9aoy 9aoy added the urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) label Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched. team The issue/pr is created by the member of Rspack. urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants