@architect/plugin-remix
⚠️ This plugin is still pre-v1. Give it a go and provide any feedback by filing an issue.
Into your existing Architect project:
npm i @architect/plugin-remix --save-dev
Add the following to your Architect project manifest (usually app.arc
):
@plugins
architect/plugin-remix
@remix
Create a remix.config.js
in your Architect project root:
// ./remix.config.js
module.exports = {}
Architect 10+
See examples/ for sample apps.
@architect/plugin-remix
is an Architect (v10+) plugin that automatically integrates the Remix framework into an Arc project.
To achieve this, the plugin hooks into Architect's local development Sandbox and deployment commands in order to build and serve a Remix project (from ./app by default).
This plugin automatically configures and uses Remix's built-in watcher as a sub-process of Architect's Sandbox.
The following directories are automatically managed (see configuration for options):
./.build/
directory will be created at the project root for the Remix server (deployed as a Lambda) and cache../public/.build/
dir will be created for Remix assets (deployed to an S3 bucket).Available plugin options and their defaults:
@remix
app-directory app
build-directory .remix
app-directory
- folder path. Specify where your Remix app lives.build-directory
- folder name. Name of folder for both server and client builds.server-handler
- (advanced usage!) Javascript file path. Use a custom Lambda handler to load the Remix server. A recommended handler is provided by default when this option is not set.mount
- Broken! - Specify a route to mount the Remix server. WIP.@architect/plugin-remix
makes its best effort to respect a project's existing remix.config.js, but does control Remix build directories to better integrate with Architect.
Based on plugin defaults and plugin configuration (via @remix
in app.arc
), the following options are mutated before being passed to Remix:
appDirectory
assetsBuildDirectory
cacheDirectory
publicPath
serverBuildPath
createArcTableSessionStorage
from @remix-run/architect
hasn't been validated in this plugin yet.ExperimentalWarning: stream/web is an experimental feature.
" messages pollute the console.
Warning: You may have dependencies that could be inaccessible in production
" when the Remix server isn't hydrated.
npx arc hydrate
after an initial Remix build has been run (via running Sandbox or an arc deploy
)