Webup: HTML/ES6 Bundler with Plugin Architecture

1.8.0 · abandoned · verified Tue Apr 21

Webup is a minimalist builder/bundler for web projects, primarily concerned with reading, joining, and splitting HTML, CSS, and JavaScript files. Unlike opinionated, all-in-one bundlers, Webup's core is intentionally 'lazy,' relying heavily on a robust plugin and preset system to perform actual bundling, optimization, and transformation tasks. The current stable version is 1.8.0, published in 2021. The project has an open-ended release cadence, with the last update several years ago. Its key differentiator is its modular approach, requiring users to explicitly configure or choose presets and plugins to achieve a desired build process, offering high flexibility but requiring more setup than integrated solutions. It supports entry points, shell templates, destination paths, and source inclusion.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates a basic Webup build configuration, bundling HTML, CSS, and JavaScript into a specified destination using the default preset.

import webup from 'webup';

// Ensure you have webup-preset-default installed: npm install webup-preset-default
// and potentially create your source files:
// public/index.html
// public/my-app.html
// public/js/main.js

webup({
  entry: 'public/index.html',
  shell: 'public/my-app.html',
  dest: 'build/index.html',
  sources: ['public/**/*', './node_modules/**/*', '!./node_modules/**/*.test.js'], // Include node_modules for dependencies
  plugins: [], // Custom plugins can be added here
  presets: ['default'] // The 'default' preset (from webup-preset-default) is essential
})
.then(() => {
  console.log('Webup build successful!');
})
.catch(error => {
  console.error('Webup build failed:', error);
});

view raw JSON →