mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-24 03:39:01 +08:00
build: make jsx-runtime be an isolated package
This commit is contained in:
parent
dd7ea894f8
commit
ffd9a46cc4
@ -1 +1 @@
|
||||
export * from '../dist/index.cjs'
|
||||
export * from '../dist/jsx-runtime.cjs'
|
||||
|
@ -1 +1 @@
|
||||
export * from '../dist/index.js'
|
||||
export * from '../dist/jsx-runtime.js'
|
||||
|
@ -2,4 +2,12 @@ import { baseConfig } from '@tiptap-shared/rollup-config'
|
||||
|
||||
import pkg from './package.json' assert { type: 'json' }
|
||||
|
||||
export default baseConfig({ input: 'src/index.ts', pkg })
|
||||
export default [baseConfig({ input: 'src/index.ts', pkg }), baseConfig({
|
||||
input: 'src/jsx-runtime.ts',
|
||||
pkg: {
|
||||
name: '@tiptap/core/jsx-runtime',
|
||||
main: 'dist/jsx-runtime.cjs',
|
||||
module: 'dist/jsx-runtime.js',
|
||||
umd: 'dist/jsx-runtime.umd.js',
|
||||
},
|
||||
})]
|
||||
|
@ -5,11 +5,7 @@ export * as extensions from './extensions/index.js'
|
||||
export * from './helpers/index.js'
|
||||
export * from './InputRule.js'
|
||||
export * from './inputRules/index.js'
|
||||
export {
|
||||
createElement,
|
||||
Fragment,
|
||||
createElement as h,
|
||||
} from './jsx-runtime.js'
|
||||
export * from './jsx-runtime.js'
|
||||
export * from './Mark.js'
|
||||
export * from './Node.js'
|
||||
export * from './NodePos.js'
|
||||
|
@ -1,4 +1,4 @@
|
||||
export type Attributes = Record<string, any>;
|
||||
type Attributes = Record<string, any>;
|
||||
|
||||
export type DOMOutputSpecElement = 0 | Attributes | DOMOutputSpecArray;
|
||||
/**
|
||||
@ -43,5 +43,8 @@ export const h: JSXRenderer = (tag, attributes, ...children) => {
|
||||
// https://www.typescriptlang.org/tsconfig/#jsxImportSource
|
||||
|
||||
export {
|
||||
h as createElement, h as jsx, h as jsxDEV, h as jsxs,
|
||||
h as createElement,
|
||||
h as jsx,
|
||||
h as jsxDEV,
|
||||
h as jsxs,
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
"target": "es2019",
|
||||
"module": "esnext",
|
||||
"strict": true,
|
||||
"jsx": "react",
|
||||
"jsx": "react-jsx",
|
||||
"importHelpers": true,
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
|
Loading…
Reference in New Issue
Block a user