Skip to content

Commit

Permalink
Default to Vite in docs and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RReverser committed Dec 22, 2024
1 parent cd6eabe commit ba8cd78
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 544 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- [Usage with various bundlers](#usage-with-various-bundlers)
- [Usage with Webpack](#usage-with-webpack)
- [Usage with Parcel](#usage-with-parcel)
- [Usage with Rollup](#usage-with-rollup)
- [Usage with Rollup / Vite](#usage-with-rollup--vite)
- [Usage without bundlers](#usage-without-bundlers)
- [Feature detection](#feature-detection)
- [License](#license)
Expand Down Expand Up @@ -170,11 +170,11 @@ If you're using Webpack v5 (version >= 5.25.1), you don't need to do anything sp

Parcel v2 also recognises the used syntax and works out of the box.

### Usage with Rollup
### Usage with Rollup / Vite

For Rollup, you'll need [`@surma/rollup-plugin-off-main-thread`](https://github.com/surma/rollup-plugin-off-main-thread) plugin (version >= 2.1.0) which brings the same functionality and was tested with this crate.
We recommend using [Vite](https://vitejs.dev/) for Rollup users, as it has all the necessary plugins built-in.

Alternatively, you can use [Vite](https://vitejs.dev/) which has necessary plugins built-in.
Alternatively, you should be able to configure Rollup yourself with plugins like [`@surma/rollup-plugin-off-main-thread`](https://github.com/surma/rollup-plugin-off-main-thread) and [`@web/rollup-plugin-import-meta-assets`](https://modern-web.dev/docs/building/rollup-plugin-import-meta-assets/) to bundle Worker and WebAssembly assets respectively.

### Usage without bundlers

Expand Down
8 changes: 1 addition & 7 deletions test/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
This is a test project for wasm-bindgen-rayon that ensures that Rayon integration works end-to-end in a browser.

It's built in several variants:

- with Webpack v5
- with Rollup
- including [`@web/rollup-plugin-import-meta-assets`](https://modern-web.dev/docs/building/rollup-plugin-import-meta-assets/) for Wasm bundling
- including [`@surma/rollup-plugin-off-main-thread`](https://github.com/surma/rollup-plugin-off-main-thread) for Worker bundling
- with `--features no-bundler` for direct usage in a browser
It's built in several variants for couple of popular bundlers as well as with `--features no-bundler` for direct usage in a browser.

Then, each of those variants is tested in a headless Chrome using [Puppeteer](https://developers.google.com/web/tools/puppeteer).
Loading

0 comments on commit ba8cd78

Please sign in to comment.