st-start
raw JSON →An opinionated, zero-configuration TypeScript project bundler & starter for frontend and Node.js, version 2.0.0-beta.48. It wraps webpack and babel with stable plugins to provide fast builds, multi-threaded type checking, HMR, and code splitting. Supports modern CSS (PostCSS, LostGrid, SASS), CSS modules with types, ESM, and auto-polyfilling via Browserslist. Includes ESLint linting, .env support, gzip compression, and an HTML artifact graph analyzer. Differentiates from other bundlers by promising a minimal or no config file, focusing on TypeScript-first workflows, and emphasizing robustness and developer experience with clear error messages and desktop notifications. Released under the MIT license and maintained by the SpringType organization, it is part of a larger ecosystem but remains a standalone tool.
Common errors
error Cannot find module 'st-start' ↓
npm install -D st-start is run. Use npx st-start to execute CLI, not a require/import. error You may need an appropriate loader to handle this file type ↓
error TypeScript: Cannot use import statement outside a module ↓
tsconfig.json has "module": "ESNext" for st-start's dynamic imports to work, or adjust your project structure. Warnings
breaking st-start v2 is a complete rewrite over v1. Configuration options and CLI flags may have changed. ↓
deprecated ESM syntax in st.config.js is not supported; only CommonJS module.exports works. ↓
gotcha st-start does not support direct import/require of its internals. The package is a CLI tool; use it via command line, not as a library. ↓
gotcha The bundler uses webpack under the hood; advanced webpack customizations might conflict with st-start's presets. ↓
Install
npm install st-start yarn add st-start pnpm add st-start Imports
- st-start (CLI) wrong
import st-start from 'st-start'correctnpx st-start - BuildConfig wrong
const BuildConfig = require('st-start').BuildConfigcorrectimport { BuildConfig } from 'st-start' - st.config.js wrong
export default { /* config */ }correctmodule.exports = { /* config */ }
Quickstart
// 1. Install st-start as a dev dependency
npm install -D st-start
// 2. Add scripts to package.json
{
"scripts": {
"start": "st-start",
"build": "st-start -env production"
}
}
// 3. Create src/index.html as entry HTML
// <!DOCTYPE html>
// <html>
// <head><title>My App</title></head>
// <body><div id="root"></div></body>
// </html>
// 4. Create src/index.tsx as entry TypeScript
// import React from 'react';
// import ReactDOM from 'react-dom';
// ReactDOM.render(<h1>Hello World</h1>, document.getElementById('root'));
// 5. Run the start script
npm run start