# b13-rocket

> FE CLI build tool

Latest version **0.8.12** (published 2026-06-17) · 0 weekly downloads

## Install

```sh
npm install b13-rocket
pnpm add b13-rocket
yarn add b13-rocket
bun add b13-rocket
```

Provides the command `rocket`.

## Health

**Score 55/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; low quality score; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.8.12 |
| Published | 2026-06-17 |
| First published | 2023-12-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=v16.13.0 |
| Dependencies | 17 |
| Unpacked size | 22.5 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | b13 GmbH |
| Maintainers | danisahni |

## Links

- npm: https://www.npmjs.com/package/b13-rocket
- npm.io page: https://npm.io/package/b13-rocket

## Dependencies (17)

- [sass](https://npm.io/package/sass.md) ^1.98.0
- [svgo](https://npm.io/package/svgo.md) ^3.3.3
- [vite](https://npm.io/package/vite.md) ^5.4.21
- [chalk](https://npm.io/package/chalk.md) ^5.6.2
- [sharp](https://npm.io/package/sharp.md) latest
- [cssnano](https://npm.io/package/cssnano.md) ^7.1.4
- [postcss](https://npm.io/package/postcss.md) ^8.5.8
- [minimist](https://npm.io/package/minimist.md) ^1.2.8
- [tsconfig](https://npm.io/package/tsconfig.md) ^7.0.0
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^10.4.27
- [browserslist](https://npm.io/package/browserslist.md) ^4.28.2
- [postcss-nested](https://npm.io/package/postcss-nested.md) ^7.0.2
- [vite-svg-loader](https://npm.io/package/vite-svg-loader.md) ^4.0.0
- [postcss-preset-env](https://npm.io/package/postcss-preset-env.md) ^10.6.1
- [postcss-sort-media-queries](https://npm.io/package/postcss-sort-media-queries.md) ^5.2.0
- [vite-plugin-image-optimizer](https://npm.io/package/vite-plugin-image-optimizer.md) ^1.1.9
- [vite-plugin-require-support](https://npm.io/package/vite-plugin-require-support.md) ^1.6.1

## Recent versions

- 0.8.12 (latest) — 2026-06-17
- 0.8.11 — 2026-04-02
- 0.8.10 — 2026-02-25
- 0.8.9 — 2026-02-18
- 0.8.8 — 2025-11-05
- 0.8.7 — 2025-10-21
- 0.8.6 — 2025-07-10
- 0.8.5 — 2025-07-10
- 0.8.4 — 2024-11-21
- 0.8.3 — 2024-11-07
- 0.8.2 — 2024-11-07
- 0.8.1 — 2024-10-31
- 0.8.0 — 2024-10-31
- 0.7.2 — 2023-12-07
- 0.7.1 — 2023-12-07
- … 1 more at https://npm.io/package/b13-rocket/versions

## README

# Rocket FE build setup

This Node CLI tool helps developers quickly create multiple frontend builds for site packages using **Vite 5**. 

## Requirements

* node >= 20.18.0 (https://nodejs.org/en/download/)
* npm >= 18.17.0 (https://www.npmjs.com/get-npm)
* yarn >= 3.0.0 (https://yarnpkg.com/en/docs/install)

<!--
## Vite Plugins:
- Babel: https://github.com/owlsdepartment/vite-plugin-babel
- dynamic import: https://github.com/vite-plugin/vite-plugin-dynamic-import
- babel-compiler: https://github.com/yzydeveloper/vite-plugin-babel-compiler
- Critical CSS: https://github.com/nystudio107/rollup-plugin-critical
- Vite dts: https://github.com/qmhc/vite-plugin-dts
- Compression: https://github.com/nonzzz/vite-plugin-compression
- Chunk split: https://github.com/sanyuan0704/vite-plugin-chunk-split
- static copy: https://github.com/sapphi-red/vite-plugin-static-copy
- build progress: https://github.com/jeddygong/vite-plugin-progress
- image Optimizer: https://github.com/FatehAK/vite-plugin-image-optimizer
- externals plugin: https://github.com/crcong/vite-plugin-externals
- auto-import: https://github.com/antfu/unplugin-auto-import
- vitest: https://github.com/vitest-dev/vitest

## Post CSS plugins:
- https://preset-env.cssdb.org/
- https://www.npmjs.com/package/postcss-nested

-->

---

## CLI Commands

To see available commands, run:

```bash
$ yarn rocket help
````

For example, to start a new build, you can run:

```bash
$ yarn rocket build --site=my-site
```

---

## Config setup

### Shared Vite Config (`config/shared.vite.config.js`)

This file contains shared Vite configuration that applies to all packages. You can extend it as needed.

```js
import { defineConfig } from 'vite';

export const sharedViteConfig = defineConfig({
	resolve: {
		alias: {
			// ...
		},
	},
});

```

### Package-specific Config (config/XXX.package.js)

For each package, you can override certain configurations using this setup:

```js
import { definePackageConfig } from 'b13-rocket';

export const config = definePackageConfig({
	name: '',   // package name
	input: '',  // entry js file
	output: '', // output directory
	root: '',   // project root
	postcss: {
		sortMediaQueries: true, // default: true
	},
	sass: {
		// Optional: silence Dart Sass deprecation warnings per package
		// e.g. "slash-div" (removed in Sass 2.0) and "import" (removed in Sass 3.0)
		silenceDeprecations: silenceDeprecations: ['slash-div', 'import', 'color-functions', 'global-builtin', 'mixed-decls', 'strict-unary'],
	},
	viteConfig: {
		// Override Vite config for this package
		resolve: {
			alias: {
				// Define package-specific aliases here
			},
		},
	},
});

```

Disable media query sorting for one package:

```js
export const config = definePackageConfig({
	name: 'labels',
	// ...
	postcss: {
		sortMediaQueries: false,
	},
});
```

Silence specific Dart Sass deprecation warnings for one package:

```js
export const config = definePackageConfig({
	name: 'legacy-package',
	// ...
	sass: {
		silenceDeprecations: ['slash-div', 'import', 'color-functions', 'global-builtin', 'mixed-decls', 'strict-unary'],
	},
});
```

---

## Extract CSS

To extract CSS from the Vite build, add the `external-` prefix to the CSS filename.

Example:

```js
import 'external-rte.css';
````

---

## Update

### Update Yarn version and switch to vite

```bash
// switch to latest yarn version
$ yarn set version berry

// update node dependencies 
$ yarn install
$ yarn remove b13-build-cli
$ yarn add b13-rocket
```

### Update .gitignore
```
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
```

### Remove package.json 'rocket' script call 

If your package.json still contains a rocket script, remove it to avoid conflicts with the new CLI version.

```
....
"scripts": {
    "rocket": "yarn node ./node_modules/b13-build-cli/index.js",
}
...
```

### Use hmr inside ddev container

1. Copy files from `files` directory to your `.ddev` directory.
2. Restart ddev (`ddev restart`)
3. Start rocket via ddev command: `ddev rocket`, `ddev rocket hmr --site=....` etc.

---
_Source: https://npm.io/package/b13-rocket · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
