48 lines
786 B
JavaScript
48 lines
786 B
JavaScript
import babel from '@rollup/plugin-babel'
|
|
|
|
export default [
|
|
{
|
|
input: ['src/index.js'],
|
|
output: [
|
|
{
|
|
file: 'dist/index.cjs',
|
|
format: 'cjs',
|
|
sourcemap: false,
|
|
inlineDynamicImports: true,
|
|
exports: 'auto'
|
|
},
|
|
{
|
|
file: 'dist/index.mjs',
|
|
format: 'esm',
|
|
sourcemap: false,
|
|
inlineDynamicImports: true,
|
|
exports: 'auto'
|
|
}
|
|
],
|
|
external: [
|
|
'postcss',
|
|
/^postcss-\d\.\d$/,
|
|
/^postcss\/lib\/*/,
|
|
'postcss-selector-parser'
|
|
],
|
|
plugins: [
|
|
babel({
|
|
babelHelpers: 'bundled',
|
|
exclude: 'node_modules/**',
|
|
extensions: ['.js', '.ts'],
|
|
presets: [
|
|
[
|
|
'@babel/preset-env',
|
|
{
|
|
loose: true,
|
|
modules: false,
|
|
targets: { node: 14 },
|
|
useBuiltIns: false
|
|
}
|
|
]
|
|
]
|
|
})
|
|
]
|
|
}
|
|
]
|