Skip to content

Commit e3e60cc

Browse files
authored
fix: bundler errors in React and Vue adapters should now be resolved (#447)
* fix: bundler errors in React and Vue adapters should now be resolved * chore: replace use-isomorphic-layout-effect with dep for RN support
1 parent 57c9f5f commit e3e60cc

File tree

12 files changed

+2190
-484
lines changed

12 files changed

+2190
-484
lines changed

examples/vue/simple/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"serve": "vite preview"
99
},
1010
"dependencies": {
11-
"@tanstack/vue-form": "workspace:*",
11+
"@tanstack/vue-form": "^0.2.0",
1212
"vue": "^3.3.4"
1313
},
1414
"devDependencies": {

examples/vue/simple/src/App.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script setup lang="ts">
22
import { useForm } from '@tanstack/vue-form'
33
import FieldInfo from './FieldInfo.vue'
4-
import { provideFormContext } from '@tanstack/vue-form/src'
54
65
const form = useForm({
76
defaultValues: {

packages/form-core/tsconfig.eslint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"compilerOptions": {
44
"noEmit": true
55
},
6-
"include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs", "rollup.config.js"]
6+
"include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs", "tsup.config.js"]
77
}

packages/react-form/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@
6262
"dependencies": {
6363
"@tanstack/form-core": "workspace:*",
6464
"@tanstack/react-store": "0.1.3",
65-
"@tanstack/store": "0.1.3"
65+
"@tanstack/store": "0.1.3",
66+
"use-isomorphic-layout-effect": "^1.1.2"
6667
},
6768
"peerDependencies": {
6869
"react": "^17.0.0 || ^18.0.0",

packages/react-form/src/useField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type {
88
} from '@tanstack/form-core'
99
import { FieldApi, functionalUpdate } from '@tanstack/form-core'
1010
import { useFormContext, formContext } from './formContext'
11-
import { useIsomorphicLayoutEffect } from './utils/useIsomorphicLayoutEffect'
11+
import useIsomorphicLayoutEffect from 'use-isomorphic-layout-effect'
1212
import type { UseFieldOptions } from './types'
1313

1414
declare module '@tanstack/form-core' {

packages/react-form/src/useForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useStore } from '@tanstack/react-store'
55
import React, { type ReactNode, useState } from 'react'
66
import { type UseField, type FieldComponent, Field, useField } from './useField'
77
import { formContext } from './formContext'
8-
import { useIsomorphicLayoutEffect } from './utils/useIsomorphicLayoutEffect'
8+
import useIsomorphicLayoutEffect from 'use-isomorphic-layout-effect'
99

1010
declare module '@tanstack/form-core' {
1111
// eslint-disable-next-line no-shadow

packages/react-form/src/utils/isBrowser.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/react-form/src/utils/useIsomorphicLayoutEffect.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/react-form/tsconfig.eslint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"compilerOptions": {
44
"noEmit": true
55
},
6-
"include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs", "rollup.config.js"]
6+
"include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs", "tsup.config.js"]
77
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"noEmit": true
5+
},
6+
"include": [
7+
"**/*.ts",
8+
"**/*.tsx",
9+
".eslintrc.cjs",
10+
"test-setup.ts",
11+
"tsup.config.js"
12+
]
13+
}

0 commit comments

Comments
 (0)