0.4.0-alpha.0 • Published 6 years ago
@penpad/rollup-config v0.4.0-alpha.0
@penpad/rollup-config
Builds a Rollup configuration for use in Penpad plugins. The buildConfig function gets you a Rollup config with some basic necessities:
- rollup-plugin-typescript2 for TypeScript support
- rollup-plugin-react-svg for loading icons
- rollup-plugin-postcss-modules for CSS modules support with PostCSS
- postcss-import for
@importsupport in CSS - postcss-preset-env for auto-prefixing and other new CSS features
- postcss-apply for
@applysupport
Usage
Write a rollup.config.js for your plugin:
// rollup.config.js
import buildConfig from '@penpad/rollup-config'
import pkg from './package.json'
export default buildConfig({
// Entry point
input: 'src/index.tsx',
pkg
})Configure npm scripts for scripts.prepare:
/* package.json */
{
"scripts": {
"prepare": "rollup --config"
}
}