Skip to content

Commit

Permalink
Add working docs on WMR
Browse files Browse the repository at this point in the history
Related-to GH-62.
Closes GH-69.

Reviewed-by: Titus Wormer <tituswormer@gmail.com>
  • Loading branch information
rschristian authored Jul 16, 2021
1 parent ea284a7 commit fd5b80e
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -1424,13 +1424,22 @@ your `vite.config.js`.

#### WMR

~~[WMR](https://github.com/preactjs/wmr) supports [Rollup][] plugins directly by
[pushing them to `config.plugins`](https://github.com/preactjs/wmr/tree/main/packages/wmr#configuration-and-plugins)
in `wmr.config.js`.~~
[WMR](https://github.com/preactjs/wmr) supports [Rollup][] plugins directly by
[adding them to `plugins`](https://wmr.dev/docs/plugins/)
in `wmr.config.mjs`.

WMR *says* it supports Rollup plugin but apparently it fails on `.mdx` files
before the Rollup plugin.
See [GH-62](https://github.com/wooorm/xdm/issues/62).
```js
import {defineConfig} from 'wmr'
import xdm from 'xdm/rollup.js'

export default defineConfig({
plugins: [
xdm({/* Options… */})
]
})
```

See [§ Preact](https://github.com/wooorm/xdm#preact) if you want to use Preact.

### Compilers

Expand Down

0 comments on commit fd5b80e

Please sign in to comment.