Skip to content

Commit

Permalink
fix: force use wasm import strategy for windows
Browse files Browse the repository at this point in the history
fixing ci and builds until fixed
  • Loading branch information
pi0 committed Nov 27, 2023
1 parent d139617 commit e73b849
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rollup/plugins/wasm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ import { extname, basename } from "node:path";
import { promises as fs } from "node:fs";
import type { Plugin } from "rollup";
import wasmBundle from "@rollup/plugin-wasm";
import { isWindows } from "std-env";
import { WasmOptions } from "../../types";

const PLUGIN_NAME = "nitro:wasm-import";
const wasmRegex = /\.wasm$/;

export function wasm(options: WasmOptions): Plugin {
return options.esmImport ? wasmImport() : wasmBundle(options.rollup);
return options.esmImport && !isWindows /* TODO */
? wasmImport()
: wasmBundle(options.rollup);
}

export function wasmImport(): Plugin {
Expand Down

0 comments on commit e73b849

Please sign in to comment.