2
0

🧑‍💻 Fix type resolution for @typebot.io/react and nextjs

Closes #968
This commit is contained in:
Baptiste Arnaud
2023-10-26 15:57:55 +02:00
parent 3f7f0944e1
commit 31b3fc311e
9 changed files with 93 additions and 25 deletions

View File

@ -4,6 +4,7 @@ import { babel } from '@rollup/plugin-babel'
import typescript from '@rollup/plugin-typescript'
import { typescriptPaths } from 'rollup-plugin-typescript-paths'
import alias from '@rollup/plugin-alias'
import { dts } from 'rollup-plugin-dts'
const extensions = ['.ts', '.tsx']
@ -33,6 +34,23 @@ const indexConfig = {
],
}
const configs = [indexConfig]
const typesConfig = {
input: './src/index.ts',
output: [{ file: './dist/index.d.ts', format: 'es' }],
plugins: [
alias({
entries: [
{ find: '@typebot.io/js', replacement: '../../js' },
{
find: '@/types',
replacement: '../types',
},
],
}),
dts(),
],
}
const configs = [indexConfig, typesConfig]
export default configs