-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.ts
More file actions
29 lines (26 loc) · 1.03 KB
/
Copy pathconfig.ts
File metadata and controls
29 lines (26 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
* Serializable compiler metadata for the NativeScript renderer.
*
* Loaded by `vite.config.ts` on the Node side, so it must not import
* `@nativescript/core` or an Octane runtime.
*/
export const NATIVESCRIPT_RENDERER_ID = 'nativescript';
export const nativeScriptRenderer = {
module: '/src/octane/renderer.ts',
target: 'universal',
/** There is no server half of a NativeScript app. */
server: 'unsupported',
intrinsics: '/src/octane/intrinsics.ts',
/** `<label>text</label>` lowers to a `#text` host the driver folds into the parent's `text`. */
text: 'host',
} as const;
/**
* Scoped to `.tsx` rather than set as `default` so the renderer's own plain
* `.ts` modules stay unowned — a `server: 'unsupported'` renderer cannot own
* them, and the compiler rejects the config if a rule selects one.
*/
export const nativeScriptRenderers = {
registry: { [NATIVESCRIPT_RENDERER_ID]: nativeScriptRenderer },
rules: [{ include: 'src/**/*.tsx', renderer: NATIVESCRIPT_RENDERER_ID }],
} as const;
export default nativeScriptRenderers;