Skip to content

Commit

Permalink
build: Use custom export condition for source files
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav committed Jan 4, 2025
1 parent b3d7917 commit 36cbef9
Show file tree
Hide file tree
Showing 83 changed files with 168 additions and 80 deletions.
4 changes: 3 additions & 1 deletion configs/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ export default defineConfig(({ mode }) => {
}),
},
resolve: {
conditions: testSSR ? ["node"] : ["browser", "development"],
conditions: testSSR
? ["@solid-primitives/source", "node"]
: ["@solid-primitives/source", "browser", "development"],
},
};
});
3 changes: 2 additions & 1 deletion packages/active-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -65,4 +66,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/audio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -63,4 +64,4 @@
"peerDependencies": {
"solid-js": "^1.6.12"
}
}
}
3 changes: 2 additions & 1 deletion packages/autofocus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand All @@ -65,4 +66,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/bounds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"types": "./dist/index.d.ts",
"browser": {},
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -69,4 +70,4 @@
"solid-js": "^1.6.12"
},
"typesVersions": {}
}
}
3 changes: 2 additions & 1 deletion packages/broadcast-channel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand All @@ -61,4 +62,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/clipboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -69,4 +70,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/connectivity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"types": "./dist/index.d.ts",
"browser": {},
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -66,4 +67,4 @@
"solid-js": "^1.8.7"
},
"typesVersions": {}
}
}
3 changes: 2 additions & 1 deletion packages/context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -61,4 +62,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/controlled-props/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"browser": {},
"typesVersions": {},
"exports": {
"@solid-primitives/source": "./src/index.tsx",
"solid": "./dist/index.jsx",
"import": {
"types": "./dist/index.d.ts",
Expand Down Expand Up @@ -63,4 +64,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/cookies/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"types": "./dist/index.d.ts",
"browser": {},
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand All @@ -65,4 +66,4 @@
"devDependencies": {
"solid-js": "^1.8.18"
}
}
}
3 changes: 2 additions & 1 deletion packages/cursor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"types": "./dist/index.d.ts",
"browser": {},
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand All @@ -65,4 +66,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/date/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -71,4 +72,4 @@
"solid-js": "^1.6.12"
},
"typesVersions": {}
}
}
3 changes: 2 additions & 1 deletion packages/deep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand All @@ -70,4 +71,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/destructure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"types": "./dist/index.d.ts",
"browser": {},
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -63,4 +64,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/devices/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -65,4 +66,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/event-bus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -66,4 +67,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/event-dispatcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"types": "./dist/index.d.ts",
"browser": {},
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand All @@ -62,4 +63,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/event-listener/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -67,4 +68,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/event-props/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -59,4 +60,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -67,4 +68,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/filesystem/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -78,4 +79,4 @@
}
},
"typesVersions": {}
}
}
3 changes: 2 additions & 1 deletion packages/flux-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand All @@ -67,4 +68,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/fullscreen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -60,4 +61,4 @@
"devDependencies": {
"solid-js": "^1.8.7"
}
}
}
3 changes: 2 additions & 1 deletion packages/geolocation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"browser": {},
"types": "./dist/index.d.ts",
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -64,4 +65,4 @@
"solid-js": "^1.6.12"
},
"typesVersions": {}
}
}
3 changes: 2 additions & 1 deletion packages/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"types": "./dist/index.d.ts",
"browser": {},
"exports": {
"@solid-primitives/source": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
Expand Down Expand Up @@ -73,4 +74,4 @@
"solid-js": "^1.6.12"
},
"typesVersions": {}
}
}
Loading

0 comments on commit 36cbef9

Please sign in to comment.