Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/lowmess/hero-patterns. Use patterns from heropatterns.com in your JavaScript lowm.es/hero-patterns
Something went wrong. Try again.
hero-patterns rollup.config.js
521 B · 28 lines
JavaScript
at master
1234567891011121314151617181920212223242526272829import path from 'path'import babel from '@rollup/plugin-babel'import { terser } from 'rollup-plugin-terser'
const pkg = require(path.resolve(process.cwd(), './package.json'))
const plugins = [babel()]
if (process.env.NODE_ENV === 'production') { plugins.push(terser())}
export default { input: './src/hero-patterns.js', plugins, output: [ { file: pkg.main, format: 'cjs', sourcemap: true, }, { file: pkg.module, format: 'es', sourcemap: true, }, ],}