🚧 Use TS project references

This commit is contained in:
Baptiste Arnaud
2024-08-28 18:09:35 +02:00
parent 0c7d2afd51
commit fdd6cc6fee
627 changed files with 3043 additions and 1696 deletions

View File

@@ -57,11 +57,12 @@ const optionalQueryParams = `(\\/?\\?.*)?`
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
transpilePackages: [
'@typebot.io/lib',
'@typebot.io/schemas',
'@typebot.io/emails',
],
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
output: 'standalone',
experimental: {
outputFileTracingRoot: join(__dirname, '../../'),

View File

@@ -1,5 +1,5 @@
{
"extends": "@typebot.io/tsconfig/nextjs.json",
"extends": "../../packages/tsconfig/nextjs.json",
"compilerOptions": {
"jsx": "react-jsx",
"baseUrl": ".",

View File

@@ -49,14 +49,13 @@
"@typebot.io/playwright": "workspace:*",
"@typebot.io/results": "workspace:*",
"@typebot.io/schemas": "workspace:*",
"@typebot.io/tsconfig": "workspace:*",
"@typebot.io/variables": "workspace:*",
"@types/cors": "2.8.13",
"@types/node": "20.4.2",
"@types/nodemailer": "6.4.14",
"@types/papaparse": "5.3.7",
"@types/qs": "6.9.7",
"@types/react": "18.2.15",
"@types/react": "18.3.4",
"dotenv": "16.4.5",
"dotenv-cli": "7.4.1",
"eslint": "8.44.0",
@@ -65,7 +64,6 @@
"next-runtime-env": "1.6.2",
"papaparse": "5.4.1",
"superjson": "1.12.4",
"typescript": "5.4.5",
"zod": "3.22.4"
}
}

View File

@@ -1,5 +1,4 @@
import { env } from '@typebot.io/env'
import React from 'react'
export const ErrorPage = ({ error }: { error: Error }) => {
return (

View File

@@ -1,7 +1,6 @@
import { gtmHeadSnippet } from '@/lib/google-tag-manager'
import Head from 'next/head'
import Script from 'next/script'
import React from 'react'
import { isNotEmpty } from '@typebot.io/lib'
import { Settings } from '@typebot.io/schemas'
import { defaultSettings } from '@typebot.io/schemas/features/typebot/settings/constants'

View File

@@ -8,7 +8,7 @@ import {
VariableWithValue,
} from '@typebot.io/schemas'
import { useRouter } from 'next/router'
import React, { useEffect, useState } from 'react'
import { useEffect, useState } from 'react'
import {
injectCustomHeadCode,
isDefined,

View File

@@ -1,4 +1,3 @@
import React from 'react'
import '../assets/styles.css'
type Props = {

View File

@@ -1,16 +1,71 @@
{
"extends": "@typebot.io/tsconfig/nextjs.json",
"extends": "../../packages/tsconfig/nextjs.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
"@/*": [
"src/*"
]
},
"plugins": [
{
"name": "next"
}
],
"strictNullChecks": true
"strictNullChecks": true,
"noEmit": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"]
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"references": [
{
"path": "../../packages/bot-engine"
},
{
"path": "../../packages/deprecated/bot-engine"
},
{
"path": "../../packages/emails"
},
{
"path": "../../packages/embeds/js"
},
{
"path": "../../packages/embeds/nextjs"
},
{
"path": "../../packages/env"
},
{
"path": "../../packages/forge/core"
},
{
"path": "../../packages/forge/repository"
},
{
"path": "../../packages/lib"
},
{
"path": "../../packages/playwright"
},
{
"path": "../../packages/prisma"
},
{
"path": "../../packages/results"
},
{
"path": "../../packages/schemas"
},
{
"path": "../../packages/variables"
}
],
"exclude": [
"node_modules"
]
}