fix(server): support non-function exports from island files (#1986)

This commit is contained in:
Reed von Redwitz
2023-11-06 11:55:16 +01:00
committed by GitHub
parent 33cc4c7866
commit 8b846816a6
12 changed files with 67 additions and 18 deletions
+7 -2
View File
@@ -93,6 +93,7 @@ import * as $$11 from "./islands/folder/subfolder/Counter.tsx";
import * as $$12 from "./islands/kebab-case-counter-test.tsx";
import * as $$13 from "./routes/route-groups-islands/(_islands)/Counter.tsx";
import * as $$14 from "./routes/route-groups-islands/(_islands)/invalid.tsx";
import { Manifest } from "$fresh/server.ts";
const manifest = {
routes: {
@@ -178,7 +179,11 @@ const manifest = {
"./islands/FormIsland.tsx": $$1,
"./islands/Greeter.tsx": $$2,
"./islands/HookIsland.tsx": $$3,
"./islands/MultipleCounters.tsx": $$4,
"./islands/MultipleCounters.tsx": {
CounterOne: $$4.CounterOne,
CounterTwo: $$4.CounterTwo,
default: $$4.default,
},
"./islands/ReturningNull.tsx": $$5,
"./islands/RootFragment.tsx": $$6,
"./islands/RootFragmentWithConditionalFirst.tsx": $$7,
@@ -191,6 +196,6 @@ const manifest = {
"./routes/route-groups-islands/(_islands)/invalid.tsx": $$14,
},
baseUrl: import.meta.url,
};
} satisfies Manifest;
export default manifest;
@@ -6,6 +6,8 @@ interface CounterProps {
id: string;
}
export const thisShouldNotCauseProblems = 42;
export default function CounterZero(props: CounterProps) {
return (
<div id={props.id}>
+2 -1
View File
@@ -4,6 +4,7 @@
import * as $0 from "./routes/index.tsx";
import * as $$0 from "./islands/Counter.tsx";
import { Manifest } from "$fresh/server.ts";
const manifest = {
routes: {
@@ -13,6 +14,6 @@ const manifest = {
"./islands/Counter.tsx": $$0,
},
baseUrl: import.meta.url,
};
} satisfies Manifest;
export default manifest;
+2 -1
View File
@@ -4,6 +4,7 @@
import * as $0 from "./routes/index.tsx";
import * as $$0 from "./islands/Counter.tsx";
import { Manifest } from "$fresh/server.ts";
const manifest = {
routes: {
@@ -13,6 +14,6 @@ const manifest = {
"./islands/Counter.tsx": $$0,
},
baseUrl: import.meta.url,
};
} satisfies Manifest;
export default manifest;
@@ -4,6 +4,7 @@
import * as $0 from "./routes/index.tsx";
import * as $$0 from "./islands/Counter.tsx";
import { Manifest } from "$fresh/server.ts";
const manifest = {
routes: {
@@ -13,6 +14,6 @@ const manifest = {
"./islands/Counter.tsx": $$0,
},
baseUrl: import.meta.url,
};
} satisfies Manifest;
export default manifest;
@@ -4,6 +4,7 @@
import * as $0 from "./routes/index.tsx";
import * as $$0 from "./islands/Counter.tsx";
import { Manifest } from "$fresh/server.ts";
const manifest = {
routes: {
@@ -13,6 +14,6 @@ const manifest = {
"./islands/Counter.tsx": $$0,
},
baseUrl: import.meta.url,
};
} satisfies Manifest;
export default manifest;
+2 -1
View File
@@ -4,6 +4,7 @@
import * as $0 from "./routes/index.tsx";
import * as $$0 from "./islands/Counter.tsx";
import { Manifest } from "$fresh/server.ts";
const manifest = {
routes: {
@@ -13,6 +14,6 @@ const manifest = {
"./islands/Counter.tsx": $$0,
},
baseUrl: import.meta.url,
};
} satisfies Manifest;
export default manifest;
+2 -1
View File
@@ -4,6 +4,7 @@
import * as $0 from "./routes/index.tsx";
import * as $$0 from "./islands/Counter.tsx";
import { Manifest } from "$fresh/server.ts";
const manifest = {
routes: {
@@ -13,6 +14,6 @@ const manifest = {
"./islands/Counter.tsx": $$0,
},
baseUrl: import.meta.url,
};
} satisfies Manifest;
export default manifest;
+3 -1
View File
@@ -4,12 +4,14 @@
import * as $0 from "./routes/index.tsx";
import { Manifest } from "$fresh/server.ts";
const manifest = {
routes: {
"./routes/index.tsx": $0,
},
islands: {},
baseUrl: import.meta.url,
};
} satisfies Manifest;
export default manifest;
+3 -1
View File
@@ -4,12 +4,14 @@
import * as $0 from "./routes/index.tsx";
import { Manifest } from "$fresh/server.ts";
const manifest = {
routes: {
"./routes/index.tsx": $0,
},
islands: {},
baseUrl: import.meta.url,
};
} satisfies Manifest;
export default manifest;