@chasecoding/nice-buttons
Version:
NPM package containing nice, customizable buttons!
57 lines (48 loc) • 1.1 kB
JavaScript
import styles from "rollup-plugin-styles";
const autoprefixer = require('autoprefixer');
import babel from '@rollup/plugin-babel';
// the entry point for the library
const input = 'src/index.js'
//
var MODE = [
{
fomart: 'cjs'
},
{
fomart: 'esm'
},
{
fomart: 'umd'
}
]
var config = []
MODE.map((m) => {
var conf = {
input: input,
output: {
name: "@chasecoding/nice-buttons",
file: `dist/index.${m.fomart}.js`,
format: m.fomart,
exports: "auto"
},
external: ["react", /@babel\/runtime/],
plugins: [
babel({
exclude: 'node_modules/**',
plugins: ['@babel/transform-runtime'],
babelHelpers: 'runtime'
}),
styles({
postcss: {
plugins: [
autoprefixer()
]
}
})
]
}
config.push(conf)
})
export default [
...config,
]