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

bundler: escape character error #8541

Closed
ije opened this issue Nov 29, 2020 · 4 comments · Fixed by #8901
Closed

bundler: escape character error #8541

ije opened this issue Nov 29, 2020 · 4 comments · Fixed by #8901
Labels
bug Something isn't working correctly cli related to cli/ dir swc related to swc (bundling/transpiling)

Comments

@ije
Copy link

ije commented Nov 29, 2020

here is my entry.ts:

const React = {
    createElement: function (...args: any[]) { console.log(args) }
}

React.createElement("span", null, "\u{b7}")

i got a wrong result with deno bundle entry.ts out.js command:

// out.js
const React = {
    createElement: function(...args) {
        console.log(args);
    }
};
React.createElement("span", null, "\u");

"\u" should be "\u{b7}"

deno 1.5.4 (bc79d55, release, x86_64-apple-darwin)

ije pushed a commit to alephjs/aleph.js that referenced this issue Nov 29, 2020
@bartlomieju bartlomieju added bug Something isn't working correctly cli related to cli/ dir labels Nov 29, 2020
@bartlomieju
Copy link
Member

Still a bug on latest master, CC @kdy1

kdy1 added a commit to kdy1/swc that referenced this issue Nov 29, 2020
@kdy1 kdy1 mentioned this issue Nov 29, 2020
2 tasks
@lucacasonato lucacasonato added the swc related to swc (bundling/transpiling) label Nov 29, 2020
kdy1 added a commit to swc-project/swc that referenced this issue Nov 30, 2020
swc_ecma_codegen:
 - Fix codegen of unicode escapes. (denoland/deno#8541)

swc_bundler:
 - Allow importing a module multiple time. (denoland/deno#8530)
@kdy1
Copy link

kdy1 commented Dec 27, 2020

This is fixed. (I've added test for it)

@ije
Copy link
Author

ije commented Dec 27, 2020

@kdy1 thanks so much!

@ije ije closed this as completed Dec 27, 2020
@lucacasonato
Copy link
Member

For tracking lets keep this issue open until we update to the swc release with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly cli related to cli/ dir swc related to swc (bundling/transpiling)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants