Skip to content

Commit

Permalink
Update readme with rollup bundling info (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
bennlich committed Jul 29, 2020
1 parent 606c5f9 commit a0a29a8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Expand Up @@ -156,6 +156,8 @@ b.bundle().pipe(process.stdout)
}
```

## Bundling

### Webpack
At the time of writing there's no Webpack loader yet. We'd love a contribution!

Expand Down Expand Up @@ -188,10 +190,18 @@ With options:
#### Options

- `useImport` - Set to true to use `import` statements for injected modules.
By default, `require` is used. Enable this if you're using Rollup.
By default, `require` is used.
- `appendChildModule` - Import path to a module that contains an `appendChild`
function. Defaults to `"nanohtml/lib/append-child"`.

### Rollup

Use the [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/master/packages/commonjs#using-with-rollupplugin-node-resolve) plugin with [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/master/packages/node-resolve). Explicitly import the browser or server entrypoint in your application. E.g.:

```
import html from 'nanohtml/lib/browser';
```

## Attributions
Shout out to [Shama](https://github.com/shama) and
[Shuhei](https://github.com/shuhei) for their contributions to
Expand Down

0 comments on commit a0a29a8

Please sign in to comment.