Skip to content

Commit 8019ec6

Browse files
authored
chore(prerender): Match tsconfig.build options with tsconfig (#146)
Match build and normal tsconfig options, so that the IDE and the build process reports the same errors
1 parent 907dd84 commit 8019ec6

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

packages/prerender/src/babelPlugins/babel-plugin-redwood-prerender-media-imports.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { extname, join, relative, dirname } from 'path'
22

33
import type { PluginObj, types, NodePath } from '@babel/core'
4+
// @ts-expect-error - using deprecated CJS vite
45
import type { ManifestChunk as ViteManifestChunk } from 'vite'
56

67
import { ensurePosixPath, getPaths } from '@cedarjs/project-config'

packages/prerender/src/runPrerender.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import path from 'path'
33

44
import React from 'react'
55

6+
// @ts-expect-error CJS vs ESM
67
import { ApolloClient, InMemoryCache } from '@apollo/client'
78
import type { CheerioAPI } from 'cheerio'
89
import { load as loadHtml } from 'cheerio'

packages/prerender/tsconfig.build.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"extends": "../../tsconfig.compilerOption.json",
33
"compilerOptions": {
4+
"module": "Node16",
5+
"moduleResolution": "Node16",
46
"rootDir": "src",
57
"outDir": "dist",
68
"allowJs": true

packages/prerender/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"allowJs": true
77
},
88
"include": ["."],
9+
"exclude": ["dist", "node_modules", "**/__tests__/fixtures"],
910
"references": [
1011
{ "path": "../babel-config" },
1112
{ "path": "../project-config" },
1213
{ "path": "../router/tsconfig.build.json" },
1314
{ "path": "../structure" },
1415
{ "path": "../web/tsconfig.build.json" },
1516
{ "path": "../framework-tools" }
16-
],
17-
"exclude": ["dist", "node_modules", "**/__mocks__", "**/__tests__/fixtures"]
17+
]
1818
}

0 commit comments

Comments
 (0)