Registry / devops / rollup-react-npm

rollup-react-npm

JSON →
library1.1.23jsnpmunverified

A boilerplate for building React components with Rollup and publishing to npm. Version 1.1.23 requires React 16.2+, lodash 4.17+, and antd 3.1+. It provides a minimal setup with Babel transpilation and a single default export. Alternative to create-react-library and nwb.

npm install rollup-react-npm
INSTALL
IMPORT
SIG · ROLLUP-REACT-NPM
R
rollup-react-npm
devopsjavascriptv1.1.23
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.

default
import MyComponent from 'rollup-react-npm'
import { MyComponent } from 'rollup-react-npm'
Only default export is provided; named export will be undefined.
MyComponent
const MyComponent = require('rollup-react-npm').default
const MyComponent = require('rollup-react-npm')
CommonJS require does not unwrap default; must access .default.

Basic usage: import default component from the package and render it. Note that antd CSS must be imported separately.

import MyComponent from 'rollup-react-npm' import 'antd/dist/antd.css' // required for antd styles function App() { return ( <div> <MyComponent /> </div> ) } export default App
Debug
Known issues
deprecatedThis package has not been updated since 2019 and relies on React 16.2.
fix
Migrate to a modern React component library or update the boilerplate.
affects: >=1.0.0
gotchaOnly default export is available; named imports will result in undefined.
fix
Use import MyComponent from '...' instead of destructuring.
affects: >=1.0.0
gotchaMissing antd CSS import will cause components to render without styles.
fix
Add import 'antd/dist/antd.css' in your entry file.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: Cannot read property '...' of undefined
Using named import instead of default import.
fix
Use import MyComponent from 'rollup-react-npm' (no braces).
Error: Module ".../node_modules/antd/lib/..." does not provide a default export
Missing antd CSS import or antd version mismatch.
fix
Ensure antd CSS is imported and antd 3.x is installed.
Upgrade
Version history
1.1.23latest on npm
Audit
Dependencies
lodashrequiredpeer dependency
reactrequiredpeer dependency
react-domrequiredpeer dependency
antdrequiredpeer dependency
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
rollup-react-npm — npm install rollup-react-npm · libregistry