Skip to content

Commit

Permalink
Merge branch 'chore/vitepkg-dual' of github.com:dac09/redwood into ch…
Browse files Browse the repository at this point in the history
…ore/vitepkg-dual

* 'chore/vitepkg-dual' of github.com:dac09/redwood:
  chore(auth): build tweaks and add missing devdep (redwoodjs#10947)
  chore(web): tsconfig.build.json (redwoodjs#10946)
  • Loading branch information
GitHub Actions committed Jul 15, 2024
2 parents af63377 + 33b0ec5 commit c190f8f
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 26 deletions.
2 changes: 1 addition & 1 deletion packages/auth/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ await build({
await build({
buildOptions: {
...defaultBuildOptions,
tsconfig: 'tsconfig.build-cjs.json',
tsconfig: 'tsconfig.build.json',
outdir: 'dist/cjs',
packages: 'external',
},
Expand Down
3 changes: 2 additions & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"build": "tsx ./build.ts && yarn build:types",
"build:pack": "yarn pack -o redwoodjs-auth.tgz",
"build:types": "tsc --build --verbose tsconfig.build.json",
"build:types-cjs": "tsc --build --verbose tsconfig.build-cjs.json",
"build:types-cjs": "tsc --build --verbose tsconfig.types-cjs.json",
"build:watch": "nodemon --watch src --ext \"js,jsx,ts,tsx\" --ignore dist --exec \"yarn build\"",
"prepublishOnly": "NODE_ENV=production yarn build",
"test": "concurrently \"npm:test:publint\" \"npm:test:vitest\" npm:test:attw",
Expand All @@ -100,6 +100,7 @@
"msw": "1.3.3",
"publint": "0.2.8",
"tsx": "4.15.6",
"type-fest": "3.13.0",
"typescript": "5.4.5",
"vitest": "1.6.0"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "./tsconfig.build.json",
"compilerOptions": {
"outDir": "dist/cjs",
},
"outDir": "dist/cjs"
}
}
2 changes: 1 addition & 1 deletion packages/prerender/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"include": ["./src/**/*", "ambient.d.ts"],
"references": [
{ "path": "../web" },
{ "path": "../web/tsconfig.build.json" },
{ "path": "../router" },
{ "path": "../internal" },
{ "path": "../project-config" },
Expand Down
10 changes: 4 additions & 6 deletions packages/testing/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
"extends": "../../tsconfig.compilerOption.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"outDir": "dist"
},
"include": [
"src",
],
"include": ["src"],
"references": [
{ "path": "../router" },
{ "path": "../babel-config" },
{ "path": "../project-config" },
{ "path": "../web" },
{ "path": "../web/tsconfig.build.json" },
{ "path": "../auth/tsconfig.build.json" },
{ "path": "../graphql-server" },
{ "path": "../graphql-server" }
]
}
2 changes: 1 addition & 1 deletion packages/vite/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
{ "path": "../project-config" },
{ "path": "../router" },
{ "path": "../server-store" },
{ "path": "../web" }
{ "path": "../web/tsconfig.build.json" }
]
}
4 changes: 2 additions & 2 deletions packages/web/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ await build({
},
buildOptions: {
...defaultBuildOptions,
// ⭐ No special build tsconfig in this package
tsconfig: 'tsconfig.build.json',
outdir: 'dist/cjs',
packages: 'external',
},
Expand All @@ -36,7 +36,7 @@ await build({
},
buildOptions: {
...defaultBuildOptions,
// ⭐ No special build tsconfig in this package
tsconfig: 'tsconfig.build.json',
format: 'esm',
packages: 'external',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"scripts": {
"build": "tsx ./build.ts && yarn build:types",
"build:pack": "yarn pack -o redwoodjs-web.tgz",
"build:types": "tsc --build --verbose ./tsconfig.json ./tsconfig.types-cjs.json",
"build:types": "tsc --build --verbose ./tsconfig.types-cjs.json",
"build:watch": "nodemon --watch src --ext \"js,jsx,ts,tsx\" --ignore dist --exec \"yarn build\"",
"prepublishOnly": "NODE_ENV=production yarn build",
"test": "concurrently npm:test:vitest npm:test:attw npm:test:publint",
Expand Down
18 changes: 18 additions & 0 deletions packages/web/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "../../tsconfig.compilerOption.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"esModuleInterop": true,
"moduleResolution": "NodeNext",
"module": "NodeNext",
},
"include": [
"./src/**/*",
"ambient.d.ts",
"testing-library.d.ts"
],
"references": [
{ "path": "../internal" }
]
}
13 changes: 5 additions & 8 deletions packages/web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{
"extends": "../../tsconfig.compilerOption.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"esModuleInterop": true,
"isolatedModules": true,
"moduleResolution": "NodeNext",
"module": "NodeNext",
"outDir": "dist"
},
"include": [
"./src/**/*",
"ambient.d.ts",
"testing-library.d.ts"
],
"include": ["."],
"exclude": ["dist", "node_modules", "**/__mocks__", "**/__fixtures__"],
"references": [
{ "path": "../framework-tools" },
{ "path": "../internal" }
]
}
6 changes: 3 additions & 3 deletions packages/web/tsconfig.types-cjs.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "./tsconfig.json",
"extends": "./tsconfig.build.json",
"compilerOptions": {
"outDir": "dist/cjs",
"module": "commonjs",
"moduleResolution": "node",
},
"moduleResolution": "node"
}
}
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7838,6 +7838,7 @@ __metadata:
publint: "npm:0.2.8"
react: "npm:19.0.0-beta-04b058868c-20240508"
tsx: "npm:4.15.6"
type-fest: "npm:3.13.0"
typescript: "npm:5.4.5"
vitest: "npm:1.6.0"
languageName: unknown
Expand Down

0 comments on commit c190f8f

Please sign in to comment.