create-rsc-kit 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/templates.js +2 -10
- package/package.json +1 -1
package/dist/templates.js
CHANGED
|
@@ -196,11 +196,7 @@ export function viteConfig(o) {
|
|
|
196
196
|
//
|
|
197
197
|
// Not optional, and not a flag on rscKit() either — the plugin builds for
|
|
198
198
|
// Nitro and nothing else, so a config without this line has no server.
|
|
199
|
-
|
|
200
|
-
// scanDirs is empty without it, so a handler written there is never scanned,
|
|
201
|
-
// the request falls through to the rsc entry, and the 404 it answers with
|
|
202
|
-
// reads as a routing bug in this package rather than a missing option.
|
|
203
|
-
plugins.push(`nitro({ preset: ${JSON.stringify(preset(o.host))}, serveStatic: 'inline', serverDir: 'server' })`);
|
|
199
|
+
plugins.push(`nitro({ preset: ${JSON.stringify(preset(o.host))}, serveStatic: 'inline' })`);
|
|
204
200
|
plugins.push(`rscKit({
|
|
205
201
|
${options.join(',\n ')},
|
|
206
202
|
})`);
|
|
@@ -273,11 +269,7 @@ export const tsconfig = (o) => JSON.stringify({
|
|
|
273
269
|
// .rsc-kit holds the generated ambient declarations. Ambient means
|
|
274
270
|
// inside the project, and `include` is what decides that — leave it out
|
|
275
271
|
// and typed routes silently fall back to string.
|
|
276
|
-
|
|
277
|
-
// server/ is the same mistake one directory over: an api handler outside
|
|
278
|
-
// the program is not type-checked at all, so one returning the wrong
|
|
279
|
-
// shape builds, deploys and fails at runtime with nothing having said so.
|
|
280
|
-
include: [`${o.sourceDir}/**/*`, 'server/**/*', '.rsc-kit/**/*'],
|
|
272
|
+
include: [`${o.sourceDir}/**/*`, '.rsc-kit/**/*'],
|
|
281
273
|
}, null, 2) + '\n';
|
|
282
274
|
export function layout(o) {
|
|
283
275
|
return `${o.tailwind ? "import './styles.css'\n" : ''}import type { ReactNode } from 'react'
|