JSPM

  • Created
  • Published
  • Downloads 196188
  • Score
    100M100P100Q20901F
  • License MIT

Wasm target for the oxc parser.

Package Exports

  • @oxc-parser/wasm
  • @oxc-parser/wasm/oxc_parser_wasm.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@oxc-parser/wasm) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

About

Experimental wasm package for the oxc parser, with full TypeScript typings support.

This package is built with wasm-pack build --release --target web for bundler (webpack / vite) consumption. Checkout oxc-parser for usage in node.js.

Source code: https://github.com/oxc-project/oxc/tree/main/wasm/parser

🚴 Usage

import initWasm, { parseSync } from "@oxc-parser/wasm";

async function main() {
  await initWasm();

  const code = "let foo";
  const result = parseSync(code, { filename: "test.ts" });
  console.log(result);
}

main();