add it back

This commit is contained in:
Toshit Chawda 2024-12-17 13:40:21 -08:00
parent 13e0656df6
commit 7b881c0013
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
2 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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