Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Sep 16, 2023
1 parent 06f4dcc commit c4f1ce1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/integration-tests/test/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -6366,6 +6366,7 @@ describe('javascript', function () {
});

it('should retain unicode escape sequences', async function () {
// See issue #8877
await fsFixture(overlayFS, __dirname)`
src/index.js:
export default ['\\u0085', '\\u200b', '\\ufffe'];
Expand Down
1 change: 1 addition & 0 deletions packages/transformers/js/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ fn emit(
));
let config = swc_core::ecma::codegen::Config::default()
.with_target(swc_core::ecma::ast::EsVersion::Es5)
// Make sure the output works regardless of whether it's loaded with the correct (utf8) encoding
.with_ascii_only(true);
let mut emitter = swc_core::ecma::codegen::Emitter {
cfg: config,
Expand Down

0 comments on commit c4f1ce1

Please sign in to comment.