Registry / devops / fascio

fascio

JSON →
library3.0.0jsnpmunverified

A simple asset bundler for frontend assets built on esbuild. Current stable version is 3.0.0. It supports PostCSS, SASS, React, Vue, Svelte and copying files. Key differentiators: minimal configuration, single API for multiple frameworks and CSS preprocessors, no CLI required—just plain JavaScript. Release cadence: stable releases as updates are made.

npm install fascio
INSTALL
IMPORT
SIG · FASCIO
F
fascio
devopsjavascriptv3.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Fascio
import Fascio from 'fascio'
const Fascio = require('fascio')
Default export; ESM since v3, CommonJS not supported. Requires type: 'module' or .mjs extension.
Fascio.js
Fascio.js('./src/entry.js')
Fascio.js('./src/entry.js', {})
Named method on the default import; not a separate import.
Fascio.react
Fascio.react('./src/entry.jsx')
Fascio.react('./src/entry.jsx', {jsx: 'automatic'})
JSX transform included; no need for extra config.
Fascio.postcss
Fascio.postcss('./src/style.css', {plugins: [require('autoprefixer')]})
Fascio.postcss('./src/style.css', {postcss: {plugins: []}})
PostCSS plugins passed in options.plugins, not nested under postcss key.
Fascio.copy
Fascio.copy('./src/assets', {dest: './dist/assets'})
Fascio.copy('./src/assets')
If dest not specified, copies to './dist' by default.

Demonstrates bundling JS, React JSX, SCSS, PostCSS, and copying static assets with Fascio.

import Fascio from 'fascio'; Fascio.js('./src/script.js', { dest: './dist', minify: true }); Fascio.react('./src/App.jsx', { dest: './dist', minify: true }); Fascio.scss('./src/main.scss', { dest: './dist', minify: true }); Fascio.postcss('./src/main.pcss', { dest: './dist', minify: true, plugins: [require('autoprefixer')] }); Fascio.copy('./public', { dest: './dist' });
Debug
Known issues
breakingv3 drops CommonJS support; only ESM is available.
fix
Use import or .mjs extension; convert any require() calls to import.
affects: >=3.0.0
gotchaPostCSS options must be passed directly in the second argument, not nested under a 'postcss' key.
fix
Use { plugins: [...] } instead of { postcss: { plugins: [...] } }.
affects: >=2.0.0
deprecatedFascio.svelte and Fascio.vue are deprecated and may be removed in a future release.
fix
Use Fascio.js with the respective esbuild plugin configured in the options.
affects: >=3.0.0
gotchaWhen using Fascio.copy, if the dest option is omitted, files are copied to './dist' by default.
fix
Always specify dest explicitly to avoid unexpected output location.
affects: >=2.0.0
breakingFascio no longer automatically detects the project's package.json for config.
fix
Pass all configuration explicitly via options; no implicit reading of package.json.
affects: >=3.0.0
Errors
Common errors & fixes
TypeError: Fascio is not a function
Using CommonJS require() on ESM-only package.
fix
Switch to import Fascio from 'fascio' or use dynamic import().
Error: Cannot find module 'esbuild'
Peer dependency esbuild not installed.
fix
Run npm install esbuild --save-dev.
Error: PostCSS plugin not found: autoprefixer
PostCSS plugins not installed or not passed correctly.
fix
Install plugin (npm install autoprefixer) and pass it in options.plugins array.
Upgrade
Version history
3.0.0latest on npm
Audit
Dependencies
esbuildrequiredCore bundling engine
sassoptionalRequired for Sass/SCSS support
postcssoptionalRequired for PostCSS support
Agent activity
2 hits · last 30 days
node
2
Resources
packagefascio
fascio — npm install fascio · libregistry