Registry / babel-react-rollup-starter

babel-react-rollup-starter

JSON →
library7.0.0jsnpmunverified

A boilerplate for web apps combining React, Babel, and Rollup. Version 7.0.0 is the latest stable release. This starter uses Rollup for bundling with Babel for transpilation, includes Browsersync for development, and enforces StandardJS linting. It provides separate configurations for development and production, with UglifyJS minification in production. Alternative to Webpack-based starters, focusing on Rollup's smaller bundle sizes and simpler configuration.

npm install babel-react-rollup-starter
INSTALL
IMPORT
SIG · BABEL-REACT-ROLLUP
B
babel-react-rollup-starter
javascriptv7.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

React
import React from 'react'
Default import from react package.
ReactDOM
import ReactDOM from 'react-dom'
const ReactDOM = require('react-dom')
CommonJS require is not recommended for bundling with Rollup; prefer ES module import.
Component
import { Component } from 'react'
import Component from 'react'
Named import for Component class.

Cloning the template, installing dependencies, starting development with Browsersync, and building for production.

// Clone repo and install dependencies git clone https://github.com/yamafaktory/babel-react-rollup-starter.git cd babel-react-rollup-starter npm install // Start development server with live reload npm start // Build for production npm run build
Debug
Known issues
breakingRequires Node.js >=6.0.0
fix
Update Node.js to version 6 or higher.
affects: >=0.0.0
deprecatedUses UglifyJS for minification; recommended to switch to Terser
fix
Replace UglifyJS plugin with rollup-plugin-terser.
affects: >=7.0.0
gotchaProduction build creates a single bundle in dist/ but does not automatically open browser
fix
Manually open html/index.html after build.
affects: >=0.0.0
gotchaStandardJS linting is enforced; code must adhere to its rules or builds may fail
fix
Run npm run lint to check and fix issues.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'rollup'
Missing local rollup dependency
fix
Run 'npm install' to install all dependencies.
Error: 'NODE_ENV' is not recognized
Environment variable not set correctly in production build
fix
Use cross-env or update rollup config to set NODE_ENV=production.
Browsersync not opening browser
Browsersync open option set to false or browser not found
fix
Check Browsersync config in package.json; ensure open: true or specify browser.
Upgrade
Version history
7.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
babel-react-rollup-starter — npm install babel-react-rollup-starter · libregistry