@architect/plugin-bundles
Version:
Architect plugin for exposing bundled modules to the browser from your Architect project.
32 lines (24 loc) • 777 B
Markdown
# `plugin-bundles`
Plugin for exposing bundled modules to the browser from your Architect project.
## Install
`npm i /plugin-bundles`
## Usage
In your `app.arc` file:
``` architect
bndl-mock
get /yolo
# Define you plugins pragma
# Add the plugin bundles module
architect/plugin-bundles
# Define the bundles pragma
# Specify which modules to bundle based off of file path.
# . Hint: You can include organization node modules by quoting the path
# . i.e. hashids "@begin/hashids"
yolo /lib/yolo.mjs
```
Bundles are will now be available at `/_static/bundles/yolo.mjs`
> 🙌 [Turn fingerprinting on and use `static.json` to retrieve the fingerprinted file name.](https://arc.codes/docs/en/guides/frontend/static-assets#fingerprint)