To customize your assets compilation, update config/assets.js
to match the following:
;
await assets.;
Inside esbuildOptionsFn
, update esbuildOptions
to set your own esbuild options for asset compilation. By the time this function runs, hanami-assets has set its own necessary options on esbuildOptions
.
If you want to apply different options when compiling assets (for production) versus watching assets (for development), use args.watch
as a conditional.
await assets.;
Slice asset customization
You can customise asset compilation for an individual slice by creating a config/assets.js
within the slice directory. This will be used in preference to the config file at the top level.