Unibundle
raw JSON → 0.2.1 verified Sat Apr 25 auth: no javascript maintenance
Unibundle is a minimal-configuration universal application bundler for Node.js and browser applications, version 0.2.1 as of its last release. It provides a simple CLI with `unibundle` for development (HMR for server and client bundles, CSS) and `unibundle build` for production. Key differentiators include its lack of enforced directory structure, built-in linting via Standard JS, and PostCSS support. The project appears to be in early stages with low maintenance activity.
Install
npm install unibundle yarn add unibundle pnpm add unibundle Imports
- unibundle wrong
npm i unibundlecorrectnpm i unibundle --save-dev - config (CommonJS) wrong
export default { ... }correctmodule.exports = production => ({ ... }) - require('./server') wrong
const app = require('./server')correctlet app = require('./server.js').default - module.hot
if (module.hot) module.hot.accept()
Quickstart
// unibundle.config.js
module.exports = production => ({
buildDir: 'build',
publicDir: 'public',
lint: true,
client: {
entry: 'app/index.js',
output: { filename: 'index.js' }
},
server: {
entry: 'server/index.js',
output: { filename: 'server.js' }
}
})
// Package.json scripts:
"dev": "unibundle"
"build": "unibundle build"
"start": "node build/server.js"