https://github.com/architect/plugin-bundles
Plugin for exposing modules to the browser from your Architect project
https://github.com/architect/plugin-bundles
Last synced: 4 months ago
JSON representation
Plugin for exposing modules to the browser from your Architect project
- Host: GitHub
- URL: https://github.com/architect/plugin-bundles
- Owner: architect
- License: apache-2.0
- Created: 2022-04-27T00:21:29.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-06T16:13:04.000Z (over 3 years ago)
- Last Synced: 2025-10-05T10:36:51.998Z (8 months ago)
- Language: JavaScript
- Size: 369 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# `plugin-bundles`
Plugin for exposing bundled modules to the browser from your Architect project.
## Install
`npm i @architect/plugin-bundles`
## Usage
In your `app.arc` file:
``` architect
@app
bndl-mock
@http
get /yolo
# Define you plugins pragma
@plugins
# Add the plugin bundles module
architect/plugin-bundles
# Define the bundles pragma
@bundles
# 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)