Skip to content

Commit

Permalink
Merge pull request #1163 from solidjs/nksaraf/islands-prodA
Browse files Browse the repository at this point in the history
fixed islands build in prod, vinxi 0.0.54
  • Loading branch information
ryansolid authored Dec 21, 2023
2 parents b22503d + aa5cfb4 commit a83f1eb
Show file tree
Hide file tree
Showing 21 changed files with 91 additions and 106 deletions.
2 changes: 1 addition & 1 deletion docs/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function Nav() {

return (
<nav class="fixed left-0 top-[52px] z-20 col-start-1 row-start-2 h-full min-w-[300px] -translate-x-full space-y-4 overflow-auto bg-slate-100 px-8 pb-20 pt-8 duration-300 ease-in-out peer-checked:translate-x-0 md:relative md:left-auto md:top-auto md:translate-x-0 md:pb-8">
<div id="docsearch" />
<div id="docsearch" style="height: 30px" />
<For each={data()}>
{r => (
<ul class="first:pt-10-">
Expand Down
4 changes: 0 additions & 4 deletions docs/components/A.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion docs/components/components.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Title as MetaTitle } from "@solidjs/meta";
import { A } from "@solidjs/router";
import { createUniqueId, mergeProps, Show } from "solid-js";
import "tippy.js/dist/tippy.css";
import A from "./A";
import Tooltip from "./tooltip";

export const components = {
Expand Down
2 changes: 1 addition & 1 deletion examples/bare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"@solidjs/start": "^0.4.1",
"solid-js": "^1.8.7",
"vinxi": "0.0.52"
"vinxi": "0.0.54"
},
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@solidjs/router": "^0.10.5",
"@solidjs/start": "^0.4.1",
"solid-js": "^1.8.7",
"vinxi": "0.0.52"
"vinxi": "0.0.54"
},
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion examples/experiments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@solidjs/router": "^0.10.5",
"@solidjs/start": "^0.4.1",
"solid-js": "^1.8.7",
"vinxi": "0.0.52"
"vinxi": "0.0.54"
},
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@solidjs/router": "^0.10.5",
"@solidjs/start": "^0.4.1",
"solid-js": "^1.8.7",
"vinxi": "0.0.52"
"vinxi": "0.0.54"
},
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion examples/todomvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@solidjs/start": "^0.4.1",
"solid-js": "^1.8.7",
"unstorage": "1.10.1",
"vinxi": "0.0.52"
"vinxi": "0.0.54"
},
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@solidjs/start": "^0.4.1",
"solid-js": "^1.8.7",
"unstorage": "1.10.1",
"vinxi": "0.0.52"
"vinxi": "0.0.54"
},
"engines": {
"node": ">=18"
Expand Down
4 changes: 2 additions & 2 deletions examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"@mdx-js/mdx": "^2.3.0",
"@solidjs/router": "^0.10.5",
"@solidjs/start": "^0.4.1",
"@vinxi/plugin-mdx": "^3.6.5",
"@vinxi/plugin-mdx": "^3.6.7",
"solid-js": "^1.8.7",
"vinxi": "0.0.52",
"vinxi": "0.0.54",
"solid-mdx": "^0.0.7"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@solidjs/start": "^0.4.1",
"prisma": "^5.7.0",
"solid-js": "^1.8.7",
"vinxi": "0.0.52"
"vinxi": "0.0.54"
},
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-solid-styled/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@solidjs/start": "^0.4.1",
"solid-js": "^1.8.7",
"solid-styled": "^0.8.2",
"vinxi": "0.0.52",
"vinxi": "0.0.54",
"vite-plugin-solid-styled": "^0.8.3"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"postcss": "^8.4.26",
"solid-js": "^1.8.7",
"tailwindcss": "^3.3.3",
"vinxi": "0.0.52"
"vinxi": "0.0.54"
},
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-trpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@solidjs/start": "^0.4.1",
"solid-js": "^1.8.7",
"valibot": "^0.23.0",
"vinxi": "0.0.52"
"vinxi": "0.0.54"
},
"engines": {
"node": ">=18"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@tailwindcss/typography": "^0.5.9",
"@trpc/client": "^9.27.4",
"@trpc/server": "^9.27.4",
"@vinxi/plugin-mdx": "^3.6.5",
"@vinxi/plugin-mdx": "^3.6.7",
"coveralls": "^3.1.1",
"debug": "^4.3.4",
"fast-glob": "^3.3.0",
Expand All @@ -52,7 +52,7 @@
"tippy.js": "^6.3.7",
"turbo": "^1.10.7",
"typescript": "4.7.4",
"vinxi": "0.0.52",
"vinxi": "0.0.54",
"vite": "^4.4.6",
"valibot": "0.24.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/start/config/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type SolidStartInlineConfig = Omit<InlineConfig, "router"> & {
server?: AppOptions['server'],
appRoot?: string,
middleware?: string,
//islands?: boolean TODO: Get PROD bugs working probably missing release
islands?: boolean
}
}

Expand Down
8 changes: 4 additions & 4 deletions packages/start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
},
"devDependencies": {
"solid-js": "^1.8.7",
"vinxi": "0.0.52"
"vinxi": "0.0.54"
},
"dependencies": {
"@vinxi/plugin-directives": "0.0.44",
"@vinxi/server-components": "0.0.44",
"@vinxi/server-functions": "0.0.45",
"@vinxi/plugin-directives": "0.0.50",
"@vinxi/server-components": "0.0.50",
"@vinxi/server-functions": "0.0.51",
"defu": "^6.1.2",
"seroval": "^1.0.0",
"seroval-plugins": "^1.0.1",
Expand Down
14 changes: 8 additions & 6 deletions packages/start/server/StartServer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,24 @@ export function StartServer(props: { document: Component<DocumentComponentProps>
const match = context.routerMatches[0][i];
if (match.metadata && match.metadata.filesystem) {
const segment = current.find(r => r.path === match.path);
const part = import.meta.env.MANIFEST["client"].inputs[segment["$component"].src];
const part = import.meta.env.MANIFEST[import.meta.env.START_ISLANDS ? "ssr" : "client"]
.inputs[segment["$component"].src];
const asset = await part.assets();
assets.push.apply(assets, asset);
current = segment.children;
}
}
}
// dedupe assets
assets = [...new Map(assets.map(item => [item.attrs.key, item])).values()].filter(
asset =>
asset.attrs.rel === "modulepreload" &&
!context.assets.find(a => a.attrs.key === asset.attrs.key)
assets = [...new Map(assets.map(item => [item.attrs.key, item])).values()].filter(asset =>
import.meta.env.START_ISLANDS
? false
: asset.attrs.rel === "modulepreload" &&
!context.assets.find(a => a.attrs.key === asset.attrs.key)
);
});

useAssets(() => assets.length ? assets.map(m => renderAsset(m)) : undefined);
useAssets(() => (assets.length ? assets.map(m => renderAsset(m)) : undefined));

return (
<NoHydration>
Expand Down
4 changes: 3 additions & 1 deletion packages/start/server/page-event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export async function createPageEvent(ctx: FetchEvent) {
assets: [
...(await clientManifest.inputs[clientManifest.handler].assets()),
...(import.meta.env.START_ISLANDS
? await serverManifest.inputs[serverManifest.handler].assets()
? (await serverManifest.inputs[serverManifest.handler].assets()).filter(
s => (s as any).attrs.rel !== "modulepreload"
)
: [])
],
initialSubmission: initFromFlash(ctx),
Expand Down
Loading

0 comments on commit a83f1eb

Please sign in to comment.