Skip to content

Commit ecbb10a

Browse files
committed
fixing the deploy
1 parent 6442524 commit ecbb10a

File tree

6 files changed

+101
-4
lines changed

6 files changed

+101
-4
lines changed

app-ugc/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"start": "vite",
77
"dev": "vite",
88
"deploy": "./deploy.sh",
9-
"build": "vite build",
9+
"//build": "`vite build` doesn't support custom tsconfigs as per https://github.com/vitejs/vite/issues/10531 so we have to do this shuffle. I am too dumb to get @rollup/plugin-typescript and/or esbuild's tsconfigRaw working, and vite-plugin-custom-tsconfig doesn't like it if you already have a `tsconfig.json`. grep 18D6F474-350E-4C59-AD61-7604C5D0758F",
10+
"build": "mv tsconfig.json tsconfig.json.temp && mv tsconfig.dist.json tsconfig.json && vite build; mv tsconfig.json tsconfig.dist.json && mv tsconfig.json.temp tsconfig.json",
1011
"build-watch": "vite build --watch",
1112
"serve": "vite preview",
1213
"tsc-build": "tsc --build",

app-ugc/tsconfig.dist.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"extends": "../tsconfig.options.json",
3+
"compilerOptions": {
4+
"outDir": "dist",
5+
"strict": true,
6+
"target": "ES2021",
7+
"module": "ESNext",
8+
"moduleResolution": "node",
9+
"allowSyntheticDefaultImports": true,
10+
"esModuleInterop": true,
11+
"forceConsistentCasingInFileNames": true,
12+
"skipLibCheck": true,
13+
"jsx": "preserve",
14+
"jsxImportSource": "solid-js",
15+
"lib": [
16+
"WebWorker",
17+
"DOM",
18+
"DOM.Iterable",
19+
"ES2021.String"
20+
],
21+
"types": [
22+
"@cloudflare/workers-types",
23+
"vite/client",
24+
]
25+
},
26+
"references": [
27+
// grep 18D6F474-350E-4C59-AD61-7604C5D0758F
28+
// `app` has two possible compile outputs - dist and publish.
29+
// (These names are scoped to this comment only - they aren't reflected anywhere else in code!)
30+
// * dist is the output of `pnpm build` and is shipped to Cloudflare
31+
// * publish is the output of `pnpm tsc-build` and is what's (eventually) published to npm
32+
// CICD produces `publish` first using `tsconfig.json`. It then produces `dist` using `tsconfig.dist.json`
33+
// Including the `app` reference below causes the build to complain with
34+
// Output file '/app/dist/src/index.d.ts' has not been built from source file '/app/src/index.tsx'.
35+
// because the `dist` has been run. Someday I'll figure out how to split the compiled output folders.
36+
// Today is not that day.
37+
// {
38+
// "path": "../app"
39+
// },
40+
{
41+
"path": "../shared"
42+
},
43+
],
44+
}

hub/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"name": "hub",
33
"scripts": {
44
"dev": "solid-start dev",
5-
"build": "solid-start build",
5+
"//build": "`vite build` doesn't support custom tsconfigs as per https://github.com/vitejs/vite/issues/10531 so we have to do this shuffle. I am too dumb to get @rollup/plugin-typescript and/or esbuild's tsconfigRaw working, and vite-plugin-custom-tsconfig doesn't like it if you already have a `tsconfig.json`. grep 18D6F474-350E-4C59-AD61-7604C5D0758F",
6+
"build": "mv tsconfig.json tsconfig.json.temp && mv tsconfig.dist.json tsconfig.json && solid-start build; mv tsconfig.json tsconfig.dist.json && mv tsconfig.json.temp tsconfig.json",
67
"start": "solid-start start",
78
"deploy": "wrangler publish",
89
"tsc-build": "tsc --build",

hub/tsconfig.dist.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"extends": "../tsconfig.options.json",
3+
"compilerOptions": {
4+
"outDir": "dist",
5+
"allowSyntheticDefaultImports": true,
6+
"esModuleInterop": true,
7+
"skipLibCheck": true,
8+
"target": "ESNext",
9+
"module": "ESNext",
10+
"moduleResolution": "node",
11+
"jsxImportSource": "solid-js",
12+
"jsx": "preserve",
13+
"strict": true,
14+
"types": [
15+
"vite/client"
16+
],
17+
"paths": {
18+
"~/*": [
19+
"./src/*"
20+
]
21+
}
22+
},
23+
"references": [
24+
// grep 18D6F474-350E-4C59-AD61-7604C5D0758F
25+
// `app` has two possible compile outputs - dist and publish.
26+
// (These names are scoped to this comment only - they aren't reflected anywhere else in code!)
27+
// * dist is the output of `pnpm build` and is shipped to Cloudflare
28+
// * publish is the output of `pnpm tsc-build` and is what's (eventually) published to npm
29+
// CICD produces `publish` first using `tsconfig.json`. It then produces `dist` using `tsconfig.dist.json`
30+
// Including the `app` reference below causes the build to complain with
31+
// Output file '/app/dist/src/index.d.ts' has not been built from source file '/app/src/index.tsx'.
32+
// because the `dist` has been run. Someday I'll figure out how to split the compiled output folders.
33+
// Today is not that day.
34+
// {
35+
// "path": "../app"
36+
// },
37+
{
38+
"path": "../cwa"
39+
},
40+
{
41+
"path": "../shared"
42+
},
43+
{
44+
"path": "../shared-dom"
45+
},
46+
{
47+
"path": "../shared-edge"
48+
},
49+
]
50+
}

lrpc/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"**/*.tsx"
3030
],
3131
"exclude": [
32-
"node_modules"
32+
"node_modules",
33+
"dist"
3334
],
3435
"ts-node": {
3536
"esm": true

tsconfig.options.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"composite": true,
44
"declaration": true,
55
"declarationMap": true,
6-
"emitDeclarationOnly": true,
6+
// "emitDeclarationOnly": true, // commenting out for now because I'm out of patience
77
"incremental": true,
88
"noEmitOnError": true,
99
"skipLibCheck": true

0 commit comments

Comments
 (0)