Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/vinext/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@
"@unpic/react": "catalog:",
"@vercel/og": "catalog:",
"@vinext/types": "workspace:^",
"image-size": "catalog:",
"ipaddr.js": "catalog:",
"magic-string": "catalog:",
"vite-plugin-commonjs": "catalog:",
Expand All @@ -190,6 +189,7 @@
"@vitejs/plugin-react": "catalog:",
"@vitejs/plugin-rsc": "catalog:",
"am-i-vibing": "catalog:",
"image-size": "catalog:",
"pathslash": "catalog:",
"react-server-dom-webpack": "catalog:",
"vite": "catalog:",
Expand Down
21 changes: 15 additions & 6 deletions packages/vinext/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,14 @@ const externalizeBareThirdPartySpecifiers = (
if (isFirstParty(id)) return false;
// Packages inlined into `dist` via `alwaysBundle` must keep resolving so they
// get bundled rather than externalized.
if (id === "am-i-vibing" || id === "process-ancestry" || id === "pathslash") return false;
if (
id === "am-i-vibing" ||
id === "image-size" ||
id === "process-ancestry" ||
id === "pathslash"
) {
return false;
}
return true;
};

Expand All @@ -70,14 +77,16 @@ export default defineConfig({
entry: ["src/**/*.ts", "src/**/*.tsx", "!src/**/*.d.ts"],
clean: true,
deps: {
// Agent detection is a CLI implementation detail, so inline it rather
// than requiring vinext consumers to install it. Same for pathslash:
// it is our own ~90-line node:path wrapper (zero deps), so bundling it
// keeps it out of consumers' install graphs.
alwaysBundle: ["am-i-vibing", "process-ancestry", "pathslash"],
// Agent detection and image dimension extraction are build-time
// implementation details, so inline them rather than requiring vinext
// consumers to install them. Same for pathslash: it is our own ~90-line
// node:path wrapper (zero deps), so bundling it keeps it out of consumers'
// install graphs.
alwaysBundle: ["am-i-vibing", "image-size", "process-ancestry", "pathslash"],
neverBundle: (id) =>
id.includes("node_modules") &&
!id.includes("am-i-vibing") &&
!id.includes("image-size") &&
!id.includes("process-ancestry") &&
!id.includes("pathslash"),
},
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading