-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Description
The assets middleware takes a directory of files that are considered public assets for the frontend, uses them all as entry points in an esbuild context. It runs the build and serves the results when a request comes in for one of the entry points.
When env.SERVER_MODE === 'development', the assets middleware runs esbuild in watch mode to automatically rebuild as the underlying assets change.
Note: this middleware should be stable enough to use in production in environments where the application source code is available on disk.
Because of the dependency on esbuild, this middleware should probably not be part of the fetch-router package.
revskill10