Skip to content

Commit

Permalink
Updates docs to have users install the bundles plugin before using.
Browse files Browse the repository at this point in the history
  • Loading branch information
kj committed Feb 21, 2024
1 parent 970be87 commit 15ea1c8
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion app/docs/md/patterns/browser-modules.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
---
title: Browser Modules
title: Building for the browser
---

## The `@bundles` plugin

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.

### Install

`npm i npm i @architect/plugin-bundles`

Add to your `.arc file`

```arc
@bundles
autocomplete '/utils/autocomplete.mjs'
```


### Basic Example

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.
Expand Down

0 comments on commit 15ea1c8

Please sign in to comment.