Furnace
Furnace provides the developer with an easy way to build assets for the frontend, by passing them through esbuild, a high-performance asset builder written Go. It supports many different content types, including, but not limited to, JavaScript, TypeScript, CSS, JSX and more. It also has a well-developed plugin ecosystem, allowing for even more functionality.
Out of the box, the Furnace installer allows you to pick some extra plugins to install, including:
Installation
Furnace can be installed via Composer:
composer require brickhouse/furnaceAfter which, you can install it to setup the default configuration:
php brickhouse install:furnaceThis command will prompt for multiple selections, such as which plugins to include, whether to use TypeScript, etc. After finished, Furnace will have created some initial assets, configuration file(s) and other elements to create a seamless development experience.
By default, Furnace will have created an esbuild build script in assets/build.mjs. This file defines how esbuild should build you assets, where they should be stored after building, and so on.
Lastly, you can build all the assets in your project:
php brickhouse buildThird-party plugins
Since Furnace is based on esbuild, all plugins will work as they would with esbuild. Esbuild has it’s own index of plugins at esbuild/community-plugins.
To install an esbuild plugin:
-
Install the package via your package manager:
Terminal window npm install --save-dev [PLUGIN-NAME]Terminal window yarn add --dev [PLUGIN-NAME]Terminal window bun add --dev [PLUGIN-NAME]Terminal window deno add --dev npm:[PLUGIN-NAME] -
Import the plugin and add it to your build script:
assets/build.mjs import * as esbuild from 'esbuild'import pluginName from "PLUGIN-NAME"await esbuild.build({// ...plugins: [// ...pluginName({// plugins options...})]});