From 5ac61f09a06c749be50fa5abd5c443c77970f3cf Mon Sep 17 00:00:00 2001 From: Boshen Date: Tue, 30 Jan 2024 21:40:10 +0800 Subject: [PATCH] feat: setup wasm parser for npm (#2221) --- .github/workflows/ci.yml | 2 +- .github/workflows/release_wasm.yml | 71 ++++++++++++ .github/workflows/website.yml | 1 - Cargo.lock | 44 +++++--- Cargo.toml | 4 +- napi/parser/Cargo.toml | 2 +- wasm/parser/.gitignore | 4 + wasm/parser/Cargo.toml | 38 +++++++ wasm/parser/README.md | 24 ++++ wasm/parser/package.json | 36 ++++++ wasm/parser/pnpm-lock.yaml | 174 +++++++++++++++++++++++++++++ wasm/parser/src/lib.rs | 105 +++++++++++++++++ website/package.json | 6 +- website/playground/index.js | 2 +- website/pnpm-lock.yaml | 6 +- website/vite.config.js | 2 +- 16 files changed, 492 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/release_wasm.yml create mode 100644 wasm/parser/.gitignore create mode 100644 wasm/parser/Cargo.toml create mode 100644 wasm/parser/README.md create mode 100644 wasm/parser/package.json create mode 100644 wasm/parser/pnpm-lock.yaml create mode 100644 wasm/parser/src/lib.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0af5a6f0c99a9..36581c768f32f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: uses: ./.github/actions/rustup with: shared-key: 'wasm' - # cache is saved from the website workflow + save-cache: ${{ github.ref_name == 'main' }} - name: Check run: | diff --git a/.github/workflows/release_wasm.yml b/.github/workflows/release_wasm.yml new file mode 100644 index 0000000000000..0fafef75ccb01 --- /dev/null +++ b/.github/workflows/release_wasm.yml @@ -0,0 +1,71 @@ +name: Release WASM + +on: + workflow_dispatch: + push: + branches: + - main + paths: + - wasm/parser/package.json # Please only commit this file, so we don't need to wait for all the other CI jobs to finish. + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + check: + name: Check version + runs-on: ubuntu-latest + outputs: + version: ${{ steps.version.outputs.version }} + version_changed: ${{ steps.version.outputs.changed }} + steps: + - uses: actions/checkout@v4 + + - name: Check version changes + uses: EndBug/version-check@v2 + id: version + with: + static-checking: localIsNew + file-url: https://unpkg.com/@oxc-parser@wasm/package.json + file-name: wasm/parser/package.json + + - name: Set version name + if: steps.version.outputs.changed == 'true' + run: | + echo "Version change found! New version: ${{ steps.version.outputs.version }} (${{ steps.version.outputs.version_type }})" + + build: + needs: check + if: needs.check.outputs.version_changed == 'true' + name: Release WASM + runs-on: ubuntu-latest + permissions: + id-token: write # for `npm publish --provenance` + steps: + - uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org' + + - name: Install Rust Toolchain + uses: ./.github/actions/rustup + with: + shared-key: 'wasm' + + - name: Build + working-directory: wasm/parser + run: | + rustup target add wasm32-unknown-unknown + corepack enable + pnpm install + pnpm run build + + - name: Publish + working-directory: npm/parser-wasm + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npm publish --tag latest --provenance --access public diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 88825cbb35580..244ef54fa227b 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -25,7 +25,6 @@ jobs: - name: Install Rust Toolchain uses: ./.github/actions/rustup with: - save-cache: ${{ github.ref_name == 'main' }} shared-key: 'wasm' - name: Install pnpm diff --git a/Cargo.lock b/Cargo.lock index 5dd9d8c7d2ade..962aeb6bdfa61 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1615,7 +1615,26 @@ dependencies = [ ] [[package]] -name = "oxc_napi_parser" +name = "oxc_parser" +version = "0.5.0" +dependencies = [ + "assert-unchecked", + "bitflags 2.4.2", + "miette", + "num-bigint", + "ouroboros", + "oxc_allocator", + "oxc_ast", + "oxc_diagnostics", + "oxc_index", + "oxc_span", + "oxc_syntax", + "rustc-hash", + "serde_json", +] + +[[package]] +name = "oxc_parser_napi" version = "0.0.0" dependencies = [ "flexbuffers", @@ -1633,22 +1652,15 @@ dependencies = [ ] [[package]] -name = "oxc_parser" -version = "0.5.0" +name = "oxc_parser_wasm" +version = "0.0.1" dependencies = [ - "assert-unchecked", - "bitflags 2.4.2", - "miette", - "num-bigint", - "ouroboros", - "oxc_allocator", - "oxc_ast", - "oxc_diagnostics", - "oxc_index", - "oxc_span", - "oxc_syntax", - "rustc-hash", - "serde_json", + "console_error_panic_hook", + "oxc", + "serde", + "serde-wasm-bindgen", + "tsify", + "wasm-bindgen", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index fd95cc97c572b..b7847599913f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ [workspace] resolver = "2" -members = ["crates/*", "tasks/*", "napi/*"] +members = ["crates/*", "tasks/*", "napi/*", "wasm/*"] exclude = ["tasks/lint_rules"] [workspace.package] authors = ["Boshen ", "Oxc contributors"] categories = ["development-tools", "web-programming", "compilers"] -description = "Oxc is a JavaScript / TypeScript tooling suite." +description = "A collection of JavaScript tools written in Rust." edition = "2021" homepage = "https://oxc-project.github.io" keywords = ["JavaScript", "TypeScript", "parser", "linter", "minifier"] diff --git a/napi/parser/Cargo.toml b/napi/parser/Cargo.toml index c0e500a1bca24..d077852177b0c 100644 --- a/napi/parser/Cargo.toml +++ b/napi/parser/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "oxc_napi_parser" +name = "oxc_parser_napi" version = "0.0.0" publish = false authors.workspace = true diff --git a/wasm/parser/.gitignore b/wasm/parser/.gitignore new file mode 100644 index 0000000000000..398ba4aa1b9ca --- /dev/null +++ b/wasm/parser/.gitignore @@ -0,0 +1,4 @@ +bin/ +pkg/ +node_modules/ +wasm-pack.log diff --git a/wasm/parser/Cargo.toml b/wasm/parser/Cargo.toml new file mode 100644 index 0000000000000..efe4ae384cf73 --- /dev/null +++ b/wasm/parser/Cargo.toml @@ -0,0 +1,38 @@ +[package] +name = "oxc_parser_wasm" +version = "0.0.1" +publish = false +authors.workspace = true +description.workspace = true +edition.workspace = true +homepage.workspace = true +keywords.workspace = true +license.workspace = true +repository.workspace = true +rust-version.workspace = true +categories.workspace = true + +[lints] +workspace = true + +[lib] +crate-type = ["cdylib", "rlib"] +test = false +doctest = false + +[features] +default = ["console_error_panic_hook"] + +[dependencies] +oxc = { workspace = true, features = ["serde", "wasm"] } +serde = { workspace = true } + +wasm-bindgen = { workspace = true } +serde-wasm-bindgen = { workspace = true } +tsify = { workspace = true } + +# The `console_error_panic_hook` crate provides better debugging of panics by +# logging them with `console.error`. This is great for development, but requires +# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for +# code size when deploying. +console_error_panic_hook = { version = "0.1.7", optional = true } diff --git a/wasm/parser/README.md b/wasm/parser/README.md new file mode 100644 index 0000000000000..368248d2b3309 --- /dev/null +++ b/wasm/parser/README.md @@ -0,0 +1,24 @@ +## 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](https://www.npmjs.com/package/oxc-parser) for usage in node.js. + +Source code: https://github.com/oxc-project/oxc/tree/main/wasm/parser + +## 🚴 Usage + +```js +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(); +``` diff --git a/wasm/parser/package.json b/wasm/parser/package.json new file mode 100644 index 0000000000000..65363228c116d --- /dev/null +++ b/wasm/parser/package.json @@ -0,0 +1,36 @@ +{ + "name": "@oxc-parser/wasm", + "version": "0.0.1", + "description": "Wasm target for the oxc parser.", + "keywords": [ + "JavaScript", + "TypeScript", + "parser" + ], + "author": "Boshen and oxc contributors", + "license": "MIT", + "homepage": "https://oxc-project.github.io", + "repository": { + "type": "git", + "url": "https://github.com/oxc-project/oxc", + "directory": "wasm/parser" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "files": [ + "oxc_parser_wasm.d.ts", + "oxc_parser_wasm.js", + "oxc_parser_wasm_bg.wasm", + "oxc_parser_wasm_bg.wasm.d.ts", + "README.md" + ], + "module": "oxc_parser_wasm.js", + "types": "oxc_parser_wasm.d.ts", + "scripts": { + "build": "wasm-pack build --release --no-pack --target web --out-dir ../../npm/parser-wasm . && cp ./package.json ../../npm/parser-wasm/package.json" + }, + "devDependencies": { + "wasm-pack": "^0.12.1" + } +} diff --git a/wasm/parser/pnpm-lock.yaml b/wasm/parser/pnpm-lock.yaml new file mode 100644 index 0000000000000..573d485ccc68b --- /dev/null +++ b/wasm/parser/pnpm-lock.yaml @@ -0,0 +1,174 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +devDependencies: + wasm-pack: + specifier: ^0.12.1 + version: 0.12.1 + +packages: + + /axios@0.26.1: + resolution: {integrity: sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==} + dependencies: + follow-redirects: 1.15.5 + transitivePeerDependencies: + - debug + dev: true + + /balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /binary-install@1.1.0: + resolution: {integrity: sha512-rkwNGW+3aQVSZoD0/o3mfPN6Yxh3Id0R/xzTVBVVpGNlVz8EGwusksxRlbk/A5iKTZt9zkMn3qIqmAt3vpfbzg==} + engines: {node: '>=10'} + dependencies: + axios: 0.26.1 + rimraf: 3.0.2 + tar: 6.2.0 + transitivePeerDependencies: + - debug + dev: true + + /brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /chownr@2.0.0: + resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} + engines: {node: '>=10'} + dev: true + + /concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + dev: true + + /follow-redirects@1.15.5: + resolution: {integrity: sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + dev: true + + /fs-minipass@2.1.0: + resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + dev: true + + /fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true + + /glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + + /inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true + + /minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minipass@3.3.6: + resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} + engines: {node: '>=8'} + dependencies: + yallist: 4.0.0 + dev: true + + /minipass@5.0.0: + resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} + engines: {node: '>=8'} + dev: true + + /minizlib@2.1.2: + resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + yallist: 4.0.0 + dev: true + + /mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + dev: true + + /once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + dev: true + + /path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + dev: true + + /rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + + /tar@6.2.0: + resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} + engines: {node: '>=10'} + dependencies: + chownr: 2.0.0 + fs-minipass: 2.1.0 + minipass: 5.0.0 + minizlib: 2.1.2 + mkdirp: 1.0.4 + yallist: 4.0.0 + dev: true + + /wasm-pack@0.12.1: + resolution: {integrity: sha512-dIyKWUumPFsGohdndZjDXRFaokUT/kQS+SavbbiXVAvA/eN4riX5QNdB6AhXQx37zNxluxQkuixZUgJ8adKjOg==} + hasBin: true + requiresBuild: true + dependencies: + binary-install: 1.1.0 + transitivePeerDependencies: + - debug + dev: true + + /wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: true + + /yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: true diff --git a/wasm/parser/src/lib.rs b/wasm/parser/src/lib.rs new file mode 100644 index 0000000000000..469d9f4f85476 --- /dev/null +++ b/wasm/parser/src/lib.rs @@ -0,0 +1,105 @@ +#![allow(clippy::needless_pass_by_value)] + +use serde::Serialize; +use tsify::Tsify; +use wasm_bindgen::prelude::*; + +use oxc::{allocator::Allocator, parser::Parser, span::SourceType}; + +#[wasm_bindgen(start)] +pub fn main() { + #[cfg(feature = "console_error_panic_hook")] + console_error_panic_hook::set_once(); +} + +/// Babel Parser Options +/// +/// +#[wasm_bindgen(getter_with_clone)] +#[derive(Default, Tsify)] +pub struct ParserOptions { + #[wasm_bindgen(js_name = sourceType)] + pub source_type: Option, + #[wasm_bindgen] + pub filename: Option, +} + +#[wasm_bindgen(getter_with_clone)] +#[derive(Default, Tsify)] +pub struct ParseResult { + #[wasm_bindgen(readonly, skip_typescript)] + #[tsify(type = "Program")] + pub program: JsValue, + #[wasm_bindgen(readonly, skip_typescript)] + #[tsify(type = "OxcDiagnostic[]")] + pub errors: Vec, +} + +#[derive(Default, Tsify, Serialize)] +pub struct OxcDiagnostic { + pub start: usize, + pub end: usize, + pub severity: String, + pub message: String, +} + +/// # Errors +/// +/// * wasm bindgen serialization failed +/// +/// # Panics +/// +/// * File extension is invalid +/// * Serde JSON serialization +#[wasm_bindgen(js_name = parseSync)] +pub fn parse_sync( + source_text: String, + options: Option, +) -> Result { + let options = options.unwrap_or_default(); + + let allocator = Allocator::default(); + + let source_type = options + .filename + .as_ref() + .map(|name| SourceType::from_path(name).unwrap()) + .unwrap_or_default(); + + let source_type = match options.source_type.as_deref() { + Some("script") => source_type.with_script(true), + Some("module") => source_type.with_module(true), + _ => source_type, + }; + + let ret = Parser::new(&allocator, &source_text, source_type).parse(); + + let serializer = serde_wasm_bindgen::Serializer::json_compatible(); + + let program = ret.program.serialize(&serializer)?; + + let errors = if ret.errors.is_empty() { + vec![] + } else { + ret.errors + .iter() + .flat_map(|error| { + let Some(labels) = error.labels() else { return vec![] }; + labels + .map(|label| { + OxcDiagnostic { + start: label.offset(), + end: label.offset() + label.len(), + severity: format!("{:?}", error.severity().unwrap_or_default()), + message: format!("{error}"), + } + .serialize(&serializer) + .unwrap() + }) + .collect::>() + }) + .collect::>() + }; + + Ok(ParseResult { program, errors }) +} diff --git a/website/package.json b/website/package.json index f90699a452181..a47bf09b2debc 100644 --- a/website/package.json +++ b/website/package.json @@ -5,9 +5,9 @@ "type": "module", "scripts": { "dev": "pnpm run wasm-dev && concurrently 'vite' 'cd .. && cargo watch --workdir website -s \"pnpm run wasm-dev\"'", - "wasm-dev": "wasm-pack build --out-dir ../../npm/wasm-web --target web --dev --scope oxc ../crates/oxc_wasm", + "wasm-dev": "wasm-pack build --out-dir ../../npm/oxc-wasm --target web --dev --scope oxc ../crates/oxc_wasm", "build": "pnpm run wasm-build && vite build --base=https://oxc-project.github.io/oxc/", - "wasm-build": "wasm-pack build --out-dir ../../npm/wasm-web --target web --release --scope oxc ../crates/oxc_wasm" + "wasm-build": "wasm-pack build --out-dir ../../npm/oxc-wasm --target web --release --scope oxc ../crates/oxc_wasm" }, "dependencies": { "@codemirror/autocomplete": "^6.12.0", @@ -28,7 +28,7 @@ }, "devDependencies": { "@lezer/common": "^1.2.1", - "@oxc/wasm-web": "link:../npm/wasm-web", + "@oxc/oxc_wasm": "link:../npm/oxc-wasm", "concurrently": "^8.2.2", "vite": "^5.0.12", "wasm-pack": "^0.12.1" diff --git a/website/playground/index.js b/website/playground/index.js index 9d0fd90288c38..bce97bffcc7da 100644 --- a/website/playground/index.js +++ b/website/playground/index.js @@ -33,7 +33,7 @@ import initWasm, { OxcLinterOptions, OxcMinifierOptions, OxcCodegenOptions, -} from "@oxc/wasm-web"; +} from "@oxc/oxc_wasm"; import { getSymbolAndReferencesSpan, renderSymbols } from "./symbols.js"; const placeholderText = ` diff --git a/website/pnpm-lock.yaml b/website/pnpm-lock.yaml index bd3ff5aa4f30e..cde662cdcadba 100644 --- a/website/pnpm-lock.yaml +++ b/website/pnpm-lock.yaml @@ -55,9 +55,9 @@ devDependencies: '@lezer/common': specifier: ^1.2.1 version: 1.2.1 - '@oxc/wasm-web': - specifier: link:../npm/wasm-web - version: link:../npm/wasm-web + '@oxc/oxc_wasm': + specifier: link:../npm/oxc-wasm + version: link:../npm/oxc-wasm concurrently: specifier: ^8.2.2 version: 8.2.2 diff --git a/website/vite.config.js b/website/vite.config.js index 435cc78e4bcb0..e6392c9bcfe3b 100644 --- a/website/vite.config.js +++ b/website/vite.config.js @@ -4,7 +4,7 @@ import { defineConfig } from 'vite' export default defineConfig({ server: { fs: { - allow: [__dirname, "../npm/wasm-web"], + allow: [__dirname, "../npm/oxc-wasm"], }, }, build: {