2023-02-08 18:12:43 +08:00
|
|
|
import babel from '@rollup/plugin-babel'
|
|
|
|
import commonjs from '@rollup/plugin-commonjs'
|
|
|
|
import resolve from '@rollup/plugin-node-resolve'
|
|
|
|
import autoExternal from 'rollup-plugin-auto-external'
|
|
|
|
import sourcemaps from 'rollup-plugin-sourcemaps'
|
|
|
|
import typescript from 'rollup-plugin-typescript2'
|
|
|
|
|
2024-06-11 20:24:10 +08:00
|
|
|
import pkg from './package.json' assert { type: 'json' }
|
2023-02-08 18:12:43 +08:00
|
|
|
|
|
|
|
export default {
|
2023-02-09 16:11:04 +08:00
|
|
|
external: [/@tiptap\/pm\/.*/],
|
2023-02-08 18:12:43 +08:00
|
|
|
input: 'src/index.ts',
|
|
|
|
output: [
|
|
|
|
{
|
|
|
|
name: pkg.name,
|
|
|
|
file: pkg.umd,
|
|
|
|
format: 'umd',
|
|
|
|
sourcemap: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: pkg.name,
|
|
|
|
file: pkg.main,
|
|
|
|
format: 'cjs',
|
|
|
|
sourcemap: true,
|
|
|
|
exports: 'auto',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: pkg.name,
|
|
|
|
file: pkg.module,
|
|
|
|
format: 'es',
|
|
|
|
sourcemap: true,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
autoExternal({
|
|
|
|
packagePath: './package.json',
|
|
|
|
}),
|
|
|
|
sourcemaps(),
|
|
|
|
resolve(),
|
|
|
|
commonjs(),
|
|
|
|
babel({
|
|
|
|
babelHelpers: 'bundled',
|
|
|
|
exclude: '../../node_modules/**',
|
|
|
|
}),
|
|
|
|
typescript({
|
|
|
|
tsconfig: '../../tsconfig.json',
|
|
|
|
tsconfigOverride: {
|
|
|
|
compilerOptions: {
|
|
|
|
declaration: true,
|
|
|
|
paths: {
|
|
|
|
'@tiptap/*': ['packages/*/src'],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
include: null,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
}
|