Rollup Starter
raw JSON → 0.2.5 verified Fri May 01 auth: no javascript abandoned
A basic Rollup setup for React and styled-components. Version 0.2.5 is the latest release. Provides a self-executable configuration, but lacks active maintenance and documentation. Minimal dependencies: React ^16.9.0 and styled-components ^4.3.2. Not recommended for production.
Common errors
error Cannot find module 'rollup-start' ↓
cause Package not installed or not in node_modules.
fix
Run: npm install rollup-start@0.2.5
error Uncaught SyntaxError: Cannot use import statement outside a module ↓
cause Trying to import ESM in a CommonJS environment.
fix
Add "type": "module" to package.json or use .mjs extension.
error TypeError: rollup_config is not a function ↓
cause Incorrect import or usage of default export.
fix
Use: import rollupConfig from 'rollup-start' (not require).
Warnings
breaking Package is abandoned; no updates since 2019. ↓
fix Use an alternative like @rollup/plugin-babel or create-react-app.
deprecated Requires React 16.9.0 and styled-components 4.3.2; incompatible with newer versions. ↓
fix Use a compatible React/styled-components version or migrate.
gotcha Missing type definitions; not TypeScript-compatible out of the box. ↓
fix Use @rollup/plugin-typescript or manually add typings.
Install
npm install rollup-start yarn add rollup-start pnpm add rollup-start Imports
- default wrong
const rollupConfig = require('rollup-start')correctimport rollupConfig from 'rollup-start' - start wrong
import start from 'rollup-start'correctimport { start } from 'rollup-start' - build wrong
import { Build } from 'rollup-start'correctimport { build } from 'rollup-start'
Quickstart
import rollupConfig from 'rollup-start';
import { start, build } from 'rollup-start';
// Example usage:
const config = rollupConfig({
input: 'src/index.js',
output: { file: 'dist/bundle.js', format: 'cjs' },
plugins: []
});
start(config); // or build(config);