Skip to content

Commit

Permalink
add it back
Browse files Browse the repository at this point in the history
  • Loading branch information
r58Playz committed Dec 17, 2024
1 parent 13e0656 commit 7b881c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion rewriter/rewriter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ where
E: Clone,
{
let allocator = Allocator::default();
let source_type = SourceType::default();
let source_type = SourceType::unambiguous()
.with_javascript(true)
.with_standard(true);
let ret = Parser::new(&allocator, js, source_type)
.with_options(ParseOptions {
parse_regular_expression: false, // default
Expand Down
2 changes: 1 addition & 1 deletion rewriter/wasm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sed -i 's/import.meta.url/""/g' out/wasm.js

cd ../../

wasm-snip rewriter/wasm/out/wasm_bg.wasm -o rewriter/wasm/out/wasm_snipped.wasm -p 'oxc_regular_expression::.*' -p 'oxc_parser::ts::.*'
wasm-snip rewriter/wasm/out/wasm_bg.wasm -o rewriter/wasm/out/wasm_snipped.wasm -p 'oxc_regular_expression::.*'

# shellcheck disable=SC2086
time wasm-opt $WASMOPTFLAGS --converge -tnh -O4 --vacuum --dce --enable-threads --enable-bulk-memory --enable-simd rewriter/wasm/out/wasm_snipped.wasm -o rewriter/wasm/out/optimized.wasm
Expand Down

0 comments on commit 7b881c0

Please sign in to comment.