supMDX-page/rollup.config.mjs
sup39 9c32cea6b8 v0.3.0
- Uses `@sup39/mdx-nav` v0.3.0, which
  - changed `Link` (next/link) to `a`
  - automatically adds slash before children entries
- Fixed children type of `MDXPage`: allows multiple child elements
2023-03-13 18:06:01 +09:00

32 lines
706 B
JavaScript

import typescript from '@rollup/plugin-typescript';
import babel from '@rollup/plugin-babel';
import resolve from '@rollup/plugin-node-resolve';
export default {
input: 'src/index.tsx',
output: [
{
file: 'dist/index.js',
format: 'cjs',
sourcemap: true,
},
{
file: 'dist/index.esm.js',
format: 'esm',
sourcemap: true,
},
],
plugins: [
resolve(),
typescript(),
babel({
babelHelpers: 'bundled',
presets: [
['@babel/preset-env', {targets: {node: 'current'}}],
'@babel/preset-react',
],
exclude: 'node_modules/**',
}),
],
external: ['react', 'react-dom', 'next/head', '@sup39/mdx-nav'],
};