1
Fork 0
mirror of https://github.com/Steffo99/bluelib.git synced 2024-12-23 03:54:21 +00:00
bluelib/rollup.config.js

39 lines
981 B
JavaScript
Raw Normal View History

2021-08-28 04:02:18 +00:00
import babel from '@rollup/plugin-babel'
import commonjs from '@rollup/plugin-commonjs'
import resolve from '@rollup/plugin-node-resolve'
import postcss from 'rollup-plugin-postcss'
import typescript from "@rollup/plugin-typescript"
import pkg from './package.json'
export default {
input: 'src/index.ts',
output: {
file: pkg.main,
format: 'cjs',
exports: 'named'
},
external: [
"@babel/runtime",
"react",
"react-dom",
"classnames",
"color",
"uuid",
],
plugins: [
postcss({
modules: true,
}),
typescript(),
babel({
babelHelpers: "runtime",
presets: ["@babel/preset-env", "@babel/preset-react"],
plugins: ["@babel/plugin-transform-runtime"],
extensions: [".tsx", ".ts", ".jsx", ".js", ".mjs"],
exclude: 'node_modules/**',
}),
resolve(),
commonjs(),
]
}