Skip to content

Commit

Permalink
fix(solid-form): Add solid export condition (#631)
Browse files Browse the repository at this point in the history
* chore: add solid export condition + build step

* chore: formatting

* Simplify source output structure

* Build with tsc only

* Re-enable Nx cloud

---------

Co-authored-by: Lachlan Collins <[email protected]>
  • Loading branch information
Brendonovich and lachlancollins authored Jun 20, 2024
1 parent 1fbc67a commit e9e0bab
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"defaultBase": "main",
"neverConnectToCloud": true,
"nxCloudAccessToken": "OTI3Y2U3NGQtYzQ3ZC00ZmE3LWJjZWQtYTYxOTEyNmNiN2IyfHJlYWQtb25seQ==",
"useInferencePlugins": false,
"parallel": 5,
"namedInputs": {
Expand Down
19 changes: 9 additions & 10 deletions packages/solid-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,24 @@
"test:lib": "vitest",
"test:lib:dev": "pnpm run test:lib --watch",
"test:build": "publint --strict",
"build": "vite build"
"build": "tsc -p tsconfig.build.json"
},
"files": [
"dist",
"src"
],
"type": "module",
"types": "dist/esm/index.d.ts",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.js",
"types": "dist/index.d.ts",
"module": "dist/index.js",
"exports": {
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
"solid": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": {
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"./package.json": "./package.json"
Expand Down
18 changes: 18 additions & 0 deletions packages/solid-form/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "solid-js",
"moduleResolution": "Bundler",
"paths": {
"@tanstack/form-core": ["../../form-core/src"]
},
"outDir": "dist",
"noEmit": false,
"declaration": true,
"rootDir": "src",
"sourceMap": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["src/tests/**"]
}

0 comments on commit e9e0bab

Please sign in to comment.