Skip to content

Commit 15ea1c8

Browse files
author
kj
committed
Updates docs to have users install the bundles plugin before using.
1 parent 970be87 commit 15ea1c8

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

app/docs/md/patterns/browser-modules.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
---
2-
title: Browser Modules
2+
title: Building for the browser
33
---
44

5+
## The `@bundles` plugin
6+
7+
For most of your browser needs you can use Enhance's built-in [browser pattern](/docs/conventions/browser) but at times you may have a component that has special imports like `css-in-js` that requires the abilities of ESBuild. In these situations you can use [plugin-bundles](https://github.com/architect/plugin-bundles) to make your component available to the browser.
8+
9+
### Install
10+
11+
`npm i npm i @architect/plugin-bundles`
12+
13+
Add to your `.arc file`
14+
15+
```arc
16+
@bundles
17+
autocomplete '/utils/autocomplete.mjs'
18+
```
19+
20+
521
### Basic Example
622

723
If you have written a bit of JS for your app that has an external dependency, you'll likely want to bundle your script with its dependency.

0 commit comments

Comments
 (0)