Skip to content

Commit c70ef06

Browse files
authored
docs: update README.md to reflect Vite 7 support (#80)
1 parent 6a433b8 commit c70ef06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Add WebAssembly ESM integration (aka. Webpack's `asyncWebAssembly`) to Vite and
1010

1111
## Installation
1212

13-
This plugin supports from Vite 2.x to 6.x. Just install it:
13+
This plugin supports Vite 2.x to 7.x. Just install it:
1414

1515
```bash
1616
yarn add -D vite-plugin-wasm
@@ -48,7 +48,7 @@ export default defineConfig({
4848

4949
To use this plugin in Web Workers. Add it (and `vite-plugin-top-level-await` if necessary) to `worker.plugins`. To support Firefox, don't use ES workers. leave `worker.format` default and use `vite-plugin-top-level-await` >= 1.4.0 (see also [here](https://github.com/Menci/vite-plugin-top-level-await#workers)):
5050

51-
```ts
51+
```typescript
5252
export default defineConfig({
5353
plugins: [
5454
wasm(),
@@ -67,4 +67,4 @@ export default defineConfig({
6767

6868
# Notes
6969

70-
TypeScript typing is broken. Since we can't declare a module with `Record<string, any>` as its named export map. Your `import ... from "./module.wasm";` will still got Vite's bulit-in typing, but the transformed code is fine. So just use an asterisk import `import * as wasmModule from "./module.wasm"` and type assertion (you have typing for your WASM files, right?).
70+
TypeScript typing is broken. Since we can't declare a module with `Record<string, any>` as its named export map, your `import ... from "./module.wasm";` will still get Vite's built-in typing, but the transformed code is fine. Thus, you can simply use an asterisk import `import * as wasmModule from "./module.wasm"` and type assertion (you have typing for your WASM files, right?).

0 commit comments

Comments
 (0)