@qwik.dev/core 2.0.0-beta.4 → 2.0.0-beta.40
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/backpatch/index.d.ts +2 -0
- package/dist/backpatch/index.mjs +5 -0
- package/dist/backpatch/package.json +8 -0
- package/dist/backpatch-executor.debug.js +59 -0
- package/dist/backpatch-executor.js +1 -0
- package/dist/build/package.json +1 -1
- package/dist/cli.mjs +12974 -0
- package/dist/core-internal.d.ts +1615 -810
- package/dist/core.min.mjs +9 -1
- package/dist/core.mjs +14792 -9192
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +10482 -5382
- package/dist/insights/index.qwik.mjs +82 -71
- package/dist/insights/vite/index.mjs +79 -81
- package/dist/loader/index.mjs +2 -2
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.d.ts +77 -288
- package/dist/optimizer.mjs +2966 -4088
- package/dist/out-of-order-executor.debug.js +140 -0
- package/dist/out-of-order-executor.js +1 -0
- package/dist/preloader.mjs +172 -192
- package/dist/qwikloader.debug.js +403 -244
- package/dist/qwikloader.js +1 -1
- package/dist/server-modules.d.ts +1 -0
- package/dist/server.d.ts +54 -249
- package/dist/server.mjs +2332 -1407
- package/dist/server.prod.mjs +3844 -0
- package/dist/starters/adapters/aws-lambda/adapters/aws-lambda/{vite.config.mts → vite.config.ts} +3 -3
- package/dist/starters/adapters/aws-lambda/package.json +3 -2
- package/dist/starters/adapters/aws-lambda/src/entry_aws-lambda.tsx +2 -6
- package/dist/starters/adapters/azure-swa/adapters/azure-swa/{vite.config.mts → vite.config.ts} +3 -3
- package/dist/starters/adapters/azure-swa/package.json +3 -2
- package/dist/starters/adapters/azure-swa/src/entry.azure-swa.tsx +2 -3
- package/dist/starters/adapters/bun/adapters/bun/{vite.config.mts → vite.config.ts} +4 -4
- package/dist/starters/adapters/bun/package.json +3 -2
- package/dist/starters/adapters/bun/src/entry.bun.ts +37 -10
- package/dist/starters/adapters/cloud-run/adapters/cloud-run/{vite.config.mts → vite.config.ts} +3 -3
- package/dist/starters/adapters/cloud-run/package.json +3 -2
- package/dist/starters/adapters/cloud-run/src/entry.cloud-run.tsx +23 -7
- package/dist/starters/adapters/cloudflare-pages/adapters/cloudflare-pages/{vite.config.mts → vite.config.ts} +3 -3
- package/dist/starters/adapters/cloudflare-pages/package.json +3 -2
- package/dist/starters/adapters/cloudflare-pages/src/entry.cloudflare-pages.tsx +2 -3
- package/dist/starters/adapters/cloudflare-workers/README.md +52 -0
- package/dist/starters/adapters/cloudflare-workers/adapters/cloudflare-workers/vite.config.ts +15 -0
- package/dist/starters/adapters/cloudflare-workers/gitignore +3 -0
- package/dist/starters/adapters/cloudflare-workers/package.json +31 -0
- package/dist/starters/adapters/cloudflare-workers/public/.assetsignore +4 -0
- package/dist/starters/adapters/cloudflare-workers/public/_headers +11 -0
- package/dist/starters/adapters/cloudflare-workers/public/_redirects +1 -0
- package/dist/starters/adapters/cloudflare-workers/src/entry.cloudflare-pages.tsx +23 -0
- package/dist/starters/adapters/cloudflare-workers/worker-configuration.d.ts +5 -0
- package/dist/starters/adapters/cloudflare-workers/wrangler.jsonc +41 -0
- package/dist/starters/adapters/deno/adapters/deno/{vite.config.mts → vite.config.ts} +3 -3
- package/dist/starters/adapters/deno/package.json +3 -2
- package/dist/starters/adapters/deno/src/entry.deno.ts +43 -10
- package/dist/starters/adapters/express/adapters/express/{vite.config.mts → vite.config.ts} +3 -3
- package/dist/starters/adapters/express/package.json +4 -3
- package/dist/starters/adapters/express/src/entry.express.tsx +22 -7
- package/dist/starters/adapters/fastify/adapters/fastify/{vite.config.mts → vite.config.ts} +3 -3
- package/dist/starters/adapters/fastify/package.json +5 -4
- package/dist/starters/adapters/fastify/src/entry.fastify.tsx +21 -1
- package/dist/starters/adapters/fastify/src/plugins/fastify-qwik.ts +11 -4
- package/dist/starters/adapters/firebase/adapters/firebase/{vite.config.mts → vite.config.ts} +3 -3
- package/dist/starters/adapters/firebase/package.json +3 -2
- package/dist/starters/adapters/firebase/src/entry-firebase.tsx +2 -3
- package/dist/starters/adapters/netlify-edge/adapters/netlify-edge/{vite.config.mts → vite.config.ts} +3 -3
- package/dist/starters/adapters/netlify-edge/package.json +5 -4
- package/dist/starters/adapters/netlify-edge/src/entry.netlify-edge.tsx +2 -3
- package/dist/starters/adapters/node-server/adapters/node-server/{vite.config.mts → vite.config.ts} +3 -3
- package/dist/starters/adapters/node-server/package.json +3 -2
- package/dist/starters/adapters/node-server/src/entry.node-server.tsx +22 -6
- package/dist/starters/adapters/{static/adapters/static/vite.config.mts → ssg/adapters/ssg/vite.config.ts} +4 -4
- package/dist/starters/adapters/ssg/package.json +20 -0
- package/dist/starters/adapters/vercel-edge/README.md +2 -2
- package/dist/starters/adapters/vercel-edge/adapters/vercel-edge/{vite.config.mts → vite.config.ts} +3 -3
- package/dist/starters/adapters/vercel-edge/package.json +3 -2
- package/dist/starters/adapters/vercel-edge/src/entry.vercel-edge.tsx +2 -3
- package/dist/starters/adapters/vercel-edge/vercel.json +1 -1
- package/dist/starters/features/auth/package.json +1 -1
- package/dist/starters/features/compiled-i18n/package.json +37 -0
- package/dist/starters/features/compiled-i18n/src/components/locale-selector/locale-selector.tsx +30 -0
- package/dist/starters/features/compiled-i18n/src/entry.ssr.tsx +31 -0
- package/dist/starters/features/compiled-i18n/src/routes/plugin@compiled-i18n.ts +28 -0
- package/dist/starters/features/csr/index.html +27 -0
- package/dist/starters/features/csr/package.json +29 -0
- package/dist/starters/features/csr/src/root.tsx +15 -0
- package/dist/starters/features/csr/vite.config.ts +13 -0
- package/dist/starters/features/cypress/src/actions/example.action.ts +5 -0
- package/dist/starters/features/cypress/src/components/example/example.cy.tsx +50 -8
- package/dist/starters/features/cypress/src/components/example/example.tsx +13 -3
- package/dist/starters/features/cypress/src/loaders/example.loader.ts +5 -0
- package/dist/starters/features/drizzle/package.json +1 -1
- package/dist/starters/features/pandacss/package.json +1 -1
- package/dist/starters/features/postcss/postcss.config.js +1 -1
- package/dist/starters/features/storybook/.storybook/tsconfig.json +0 -1
- package/dist/starters/features/styled-vanilla-extract/package.json +2 -1
- package/dist/starters/features/tailwind/package.json +2 -2
- package/dist/starters/features/tailwind/prettier.config.js +10 -0
- package/dist/starters/features/tailwind-v3/package.json +1 -1
- package/dist/starters/features/tailwind-v3/prettier.config.js +10 -0
- package/dist/starters/features/vitest/package.json +1 -1
- package/dist/testing/index.d.ts +1000 -7
- package/dist/testing/index.mjs +16487 -11656
- package/dist/testing/package.json +1 -1
- package/dist/worker/index.d.mts +21 -0
- package/dist/worker/index.mjs +251 -0
- package/dist/worker/package.json +9 -0
- package/dist/worker/worker.js +13 -0
- package/dist/worker/worker.node.js +15 -0
- package/dist/worker/worker.shared.js +63 -0
- package/handlers.mjs +21 -1
- package/package.json +40 -56
- package/public.d.ts +14 -2
- package/{qwik-cli.cjs → qwik-cli.mjs} +1 -1
- package/server.d.ts +2 -0
- package/worker.d.ts +2 -0
- package/bindings/qwik.darwin-arm64.node +0 -0
- package/bindings/qwik.darwin-x64.node +0 -0
- package/bindings/qwik.linux-x64-gnu.node +0 -0
- package/bindings/qwik.wasm.cjs +0 -471
- package/bindings/qwik.wasm.mjs +0 -464
- package/bindings/qwik.win32-x64-msvc.node +0 -0
- package/bindings/qwik_wasm_bg.wasm +0 -0
- package/dist/build/index.cjs +0 -35
- package/dist/build/index.cjs.map +0 -7
- package/dist/build/index.dev.cjs +0 -37
- package/dist/build/index.dev.cjs.map +0 -7
- package/dist/build/index.prod.cjs +0 -37
- package/dist/build/index.prod.cjs.map +0 -7
- package/dist/cli.cjs +0 -5545
- package/dist/core.cjs +0 -11870
- package/dist/core.cjs.map +0 -1
- package/dist/core.prod.cjs +0 -5723
- package/dist/insights/index.qwik.cjs +0 -1
- package/dist/insights/vite/index.cjs +0 -1
- package/dist/loader/index.cjs +0 -4
- package/dist/optimizer.cjs +0 -4020
- package/dist/preloader.cjs +0 -269
- package/dist/server.cjs +0 -3040
- package/dist/starters/adapters/static/package.json +0 -19
- package/dist/starters/features/localize/package.json +0 -37
- package/dist/starters/features/localize/src/entry.ssr.tsx +0 -30
- package/dist/starters/features/localize/src/locales/message.en.json +0 -8
- package/dist/starters/features/localize/src/locales/message.it.json +0 -8
- package/dist/starters/features/localize/src/routes/[locale]/i18n-utils.ts +0 -94
- package/dist/starters/features/localize/src/routes/[locale]/index.tsx +0 -52
- package/dist/starters/features/localize/src/routes/[locale]/layout.tsx +0 -12
- package/dist/starters/features/playwright/playwright-report/index.html +0 -22026
- package/dist/starters/features/tailwind/.prettierrc.js +0 -3
- package/dist/testing/index.cjs +0 -33388
- /package/dist/starters/adapters/{static → ssg}/README.md +0 -0
package/dist/optimizer.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { EntryStrategy } from '@qwik.dev/optimizer';
|
|
2
|
+
import { Optimizer } from '@qwik.dev/optimizer';
|
|
3
|
+
import { OptimizerOptions } from '@qwik.dev/optimizer';
|
|
1
4
|
import type { Plugin as Plugin_2 } from 'vite';
|
|
5
|
+
import { SegmentAnalysis } from '@qwik.dev/optimizer';
|
|
6
|
+
import { TransformModule } from '@qwik.dev/optimizer';
|
|
7
|
+
import { TransformModuleInput } from '@qwik.dev/optimizer';
|
|
2
8
|
|
|
3
9
|
/**
|
|
4
10
|
* A function that returns a map of bundle names to their dependencies.
|
|
@@ -10,37 +16,6 @@ export declare type BundleGraphAdder = (manifest: QwikManifest) => Record<string
|
|
|
10
16
|
dynamicImports?: string[];
|
|
11
17
|
}>;
|
|
12
18
|
|
|
13
|
-
/** @public */
|
|
14
|
-
export declare interface ComponentEntryStrategy {
|
|
15
|
-
type: 'component';
|
|
16
|
-
manual?: Record<string, string>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/** @public */
|
|
20
|
-
export declare const createOptimizer: (optimizerOptions?: OptimizerOptions) => Promise<Optimizer>;
|
|
21
|
-
|
|
22
|
-
declare function createSymbolMapper(base: string): SymbolMapperFn;
|
|
23
|
-
|
|
24
|
-
/** @public */
|
|
25
|
-
export declare interface Diagnostic {
|
|
26
|
-
scope: string;
|
|
27
|
-
category: DiagnosticCategory;
|
|
28
|
-
code: string | null;
|
|
29
|
-
file: string;
|
|
30
|
-
message: string;
|
|
31
|
-
highlights: SourceLocation[] | null;
|
|
32
|
-
suggestions: string[] | null;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/** @public */
|
|
36
|
-
export declare type DiagnosticCategory = 'error' | 'warning' | 'sourceError';
|
|
37
|
-
|
|
38
|
-
/** @public */
|
|
39
|
-
declare type EmitMode = 'dev' | 'prod' | 'lib';
|
|
40
|
-
|
|
41
|
-
/** @public */
|
|
42
|
-
export declare type EntryStrategy = InlineEntryStrategy | HoistEntryStrategy | SingleEntryStrategy | HookEntryStrategy_2 | SegmentEntryStrategy | ComponentEntryStrategy | SmartEntryStrategy;
|
|
43
|
-
|
|
44
19
|
/**
|
|
45
20
|
* Use `__EXPERIMENTAL__.x` to check if feature `x` is enabled. It will be replaced with `true` or
|
|
46
21
|
* `false` via an exact string replacement.
|
|
@@ -50,18 +25,20 @@ export declare type EntryStrategy = InlineEntryStrategy | HoistEntryStrategy | S
|
|
|
50
25
|
* @public
|
|
51
26
|
*/
|
|
52
27
|
export declare enum ExperimentalFeatures {
|
|
53
|
-
/** Enable the
|
|
54
|
-
|
|
28
|
+
/** Enable the Each keyed-list primitive */
|
|
29
|
+
each = "each",
|
|
30
|
+
/** Enable the Show conditional primitive */
|
|
31
|
+
show = "show",
|
|
32
|
+
/** Enable the Suspense fallback primitive */
|
|
33
|
+
suspense = "suspense",
|
|
55
34
|
/** Enable the Valibot form validation */
|
|
56
35
|
valibot = "valibot",
|
|
57
36
|
/** Disable SPA navigation handler in Qwik Router */
|
|
58
37
|
noSPA = "noSPA",
|
|
59
|
-
/** Enable
|
|
60
|
-
|
|
61
|
-
/** Enable
|
|
62
|
-
|
|
63
|
-
/** Enable the ability to use the Qwik Insights vite plugin and <Insights/> component */
|
|
64
|
-
insights = "insights"
|
|
38
|
+
/** Enable the ability to use the Qwik Insights vite plugin and `<Insights/>` component */
|
|
39
|
+
insights = "insights",
|
|
40
|
+
/** Enable the `blockSSR: false` route loader option */
|
|
41
|
+
blockSSR = "blockSSR"
|
|
65
42
|
}
|
|
66
43
|
|
|
67
44
|
/** @public */
|
|
@@ -73,59 +50,11 @@ export declare interface GlobalInjections {
|
|
|
73
50
|
location: 'head' | 'body';
|
|
74
51
|
}
|
|
75
52
|
|
|
76
|
-
|
|
77
|
-
declare interface HoistEntryStrategy {
|
|
78
|
-
type: 'hoist';
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/** @deprecated Use SegmentStrategy instead */
|
|
82
|
-
declare interface HookEntryStrategy_2 {
|
|
83
|
-
type: 'hook';
|
|
84
|
-
manual?: Record<string, string>;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/** @public */
|
|
88
|
-
export declare interface InlineEntryStrategy {
|
|
89
|
-
type: 'inline';
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/** @public */
|
|
93
|
-
export declare type MinifyMode = 'simplify' | 'none';
|
|
94
|
-
|
|
95
|
-
declare interface NormalizedQwikPluginOptions extends Omit<Required<QwikPluginOptions>, 'vendorRoots' | 'experimental'> {
|
|
53
|
+
declare interface NormalizedQwikPluginOptions extends Omit<Required<QwikPluginOptions>, 'input' | 'vendorRoots' | 'srcInputs' | 'experimental'> {
|
|
96
54
|
input: string[] | {
|
|
97
55
|
[entry: string]: string;
|
|
98
|
-
};
|
|
99
|
-
experimental
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/** @public */
|
|
103
|
-
export declare interface Optimizer {
|
|
104
|
-
/** Transforms the input code string, does not access the file system. */
|
|
105
|
-
transformModules(opts: TransformModulesOptions): Promise<TransformOutput>;
|
|
106
|
-
/** Optimizer system use. This can be updated with a custom file system. */
|
|
107
|
-
sys: OptimizerSystem;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/** @public */
|
|
111
|
-
export declare interface OptimizerOptions {
|
|
112
|
-
sys?: OptimizerSystem;
|
|
113
|
-
binding?: any;
|
|
114
|
-
/** Inline the global styles if they're smaller than this */
|
|
115
|
-
inlineStylesUpToBytes?: number;
|
|
116
|
-
/** Enable sourcemaps */
|
|
117
|
-
sourcemap?: boolean;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/** @public */
|
|
121
|
-
export declare interface OptimizerSystem {
|
|
122
|
-
cwd: () => string;
|
|
123
|
-
env: SystemEnvironment;
|
|
124
|
-
os: string;
|
|
125
|
-
dynamicImport: (path: string) => Promise<any>;
|
|
126
|
-
strictDynamicImport: (path: string) => Promise<any>;
|
|
127
|
-
getInputFiles?: (rootDir: string) => Promise<TransformModuleInput[]>;
|
|
128
|
-
path: Path;
|
|
56
|
+
} | undefined;
|
|
57
|
+
experimental: Record<keyof typeof ExperimentalFeatures, boolean> | undefined;
|
|
129
58
|
}
|
|
130
59
|
|
|
131
60
|
/**
|
|
@@ -138,36 +67,6 @@ declare type P<T> = Plugin_2<T> & {
|
|
|
138
67
|
config: Extract<Plugin_2<T>['config'], Function>;
|
|
139
68
|
};
|
|
140
69
|
|
|
141
|
-
/** @public */
|
|
142
|
-
export declare interface Path {
|
|
143
|
-
resolve(...paths: string[]): string;
|
|
144
|
-
normalize(path: string): string;
|
|
145
|
-
isAbsolute(path: string): boolean;
|
|
146
|
-
join(...paths: string[]): string;
|
|
147
|
-
relative(from: string, to: string): string;
|
|
148
|
-
dirname(path: string): string;
|
|
149
|
-
basename(path: string, ext?: string): string;
|
|
150
|
-
extname(path: string): string;
|
|
151
|
-
format(pathObject: {
|
|
152
|
-
root: string;
|
|
153
|
-
dir: string;
|
|
154
|
-
base: string;
|
|
155
|
-
ext: string;
|
|
156
|
-
name: string;
|
|
157
|
-
}): string;
|
|
158
|
-
parse(path: string): {
|
|
159
|
-
root: string;
|
|
160
|
-
dir: string;
|
|
161
|
-
base: string;
|
|
162
|
-
ext: string;
|
|
163
|
-
name: string;
|
|
164
|
-
};
|
|
165
|
-
readonly sep: string;
|
|
166
|
-
readonly delimiter: string;
|
|
167
|
-
readonly win32: null;
|
|
168
|
-
readonly posix: Path;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
70
|
/** @public */
|
|
172
71
|
export declare interface QwikAsset {
|
|
173
72
|
/** Name of the asset */
|
|
@@ -265,9 +164,33 @@ export declare interface QwikManifest {
|
|
|
265
164
|
};
|
|
266
165
|
}
|
|
267
166
|
|
|
167
|
+
/** @public */
|
|
268
168
|
declare interface QwikPluginDevTools {
|
|
169
|
+
/**
|
|
170
|
+
* Validates image sizes for CLS issues during development. In case of issues, provides you with a
|
|
171
|
+
* correct image size resolutions. If set to `false`, image dev tool will be disabled.
|
|
172
|
+
*
|
|
173
|
+
* Default `true`
|
|
174
|
+
*/
|
|
269
175
|
imageDevTools?: boolean | true;
|
|
176
|
+
/**
|
|
177
|
+
* Press-hold the defined keys to enable qwik dev inspector. By default the behavior is activated
|
|
178
|
+
* by pressing the left or right `Alt` key. If set to `false`, qwik dev inspector will be
|
|
179
|
+
* disabled.
|
|
180
|
+
*
|
|
181
|
+
* Valid values are `KeyboardEvent.code` values. Please note that the 'Left' and 'Right' suffixes
|
|
182
|
+
* are ignored.
|
|
183
|
+
*/
|
|
270
184
|
clickToSource?: string[] | false;
|
|
185
|
+
/**
|
|
186
|
+
* Enable HMR for Qwik components. When enabled, editing a component file re-renders only that
|
|
187
|
+
* component without a full page reload, preserving client state.
|
|
188
|
+
*
|
|
189
|
+
* Set this to `false` for full page reloads on component edits.
|
|
190
|
+
*
|
|
191
|
+
* Default `true`
|
|
192
|
+
*/
|
|
193
|
+
hmr?: boolean;
|
|
271
194
|
}
|
|
272
195
|
|
|
273
196
|
declare interface QwikPluginOptions {
|
|
@@ -281,13 +204,16 @@ declare interface QwikPluginOptions {
|
|
|
281
204
|
vendorRoots?: string[];
|
|
282
205
|
manifestOutput?: ((manifest: QwikManifest) => Promise<void> | void) | null;
|
|
283
206
|
manifestInput?: QwikManifest | null;
|
|
207
|
+
manifestInputPath?: string | null;
|
|
284
208
|
input?: string[] | string | {
|
|
285
209
|
[entry: string]: string;
|
|
286
210
|
};
|
|
287
211
|
outDir?: string;
|
|
288
|
-
|
|
212
|
+
ssrOutDir?: string;
|
|
213
|
+
clientOutDir?: string;
|
|
289
214
|
srcDir?: string | null;
|
|
290
215
|
scope?: string | null;
|
|
216
|
+
/** @deprecated Not used */
|
|
291
217
|
srcInputs?: TransformModuleInput[] | null;
|
|
292
218
|
sourcemap?: boolean;
|
|
293
219
|
resolveQwikBuild?: boolean;
|
|
@@ -313,10 +239,10 @@ declare interface QwikPluginOptions {
|
|
|
313
239
|
}
|
|
314
240
|
|
|
315
241
|
/** @public */
|
|
316
|
-
export declare function
|
|
242
|
+
export declare function qwikRolldown(qwikRolldownOpts?: QwikRolldownPluginOptions): any;
|
|
317
243
|
|
|
318
244
|
/** @public */
|
|
319
|
-
export declare interface
|
|
245
|
+
export declare interface QwikRolldownPluginOptions {
|
|
320
246
|
csr?: boolean;
|
|
321
247
|
/**
|
|
322
248
|
* Build `production` or `development`.
|
|
@@ -395,6 +321,22 @@ export declare interface QwikRollupPluginOptions {
|
|
|
395
321
|
experimental?: (keyof typeof ExperimentalFeatures)[];
|
|
396
322
|
}
|
|
397
323
|
|
|
324
|
+
/**
|
|
325
|
+
* Renamed to `qwikRolldown`.
|
|
326
|
+
*
|
|
327
|
+
* @deprecated Use `qwikRolldown`.
|
|
328
|
+
* @public
|
|
329
|
+
*/
|
|
330
|
+
export declare const qwikRollup: typeof qwikRolldown;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Renamed to `QwikRolldownPluginOptions`.
|
|
334
|
+
*
|
|
335
|
+
* @deprecated Use `QwikRolldownPluginOptions`.
|
|
336
|
+
* @public
|
|
337
|
+
*/
|
|
338
|
+
export declare type QwikRollupPluginOptions = QwikRolldownPluginOptions;
|
|
339
|
+
|
|
398
340
|
/** @public */
|
|
399
341
|
export declare interface QwikSymbol {
|
|
400
342
|
origin: string;
|
|
@@ -414,7 +356,7 @@ export declare interface QwikSymbol {
|
|
|
414
356
|
}
|
|
415
357
|
|
|
416
358
|
/**
|
|
417
|
-
* The types for Vite/
|
|
359
|
+
* The types for Vite/Rolldown don't allow us to be too specific about the return type. The correct
|
|
418
360
|
* return type is `[QwikVitePlugin, VitePlugin<never>]`, and if you search the plugin by name you'll
|
|
419
361
|
* get the `QwikVitePlugin`.
|
|
420
362
|
*
|
|
@@ -422,12 +364,6 @@ export declare interface QwikSymbol {
|
|
|
422
364
|
*/
|
|
423
365
|
export declare function qwikVite(qwikViteOpts?: QwikVitePluginOptions): any;
|
|
424
366
|
|
|
425
|
-
/** @public */
|
|
426
|
-
export declare interface QwikViteDevResponse {
|
|
427
|
-
_qwikEnvData?: Record<string, any>;
|
|
428
|
-
_qwikRenderResolve?: () => void;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
367
|
/**
|
|
432
368
|
* This is the type of the "pre" Qwik Vite plugin. `qwikVite` actually returns a tuple of two
|
|
433
369
|
* plugins, but after Vite flattens them, you can find the plugin by name.
|
|
@@ -446,8 +382,11 @@ export declare interface QwikVitePluginApi {
|
|
|
446
382
|
getRootDir: () => string | null;
|
|
447
383
|
getClientOutDir: () => string | null;
|
|
448
384
|
getClientPublicOutDir: () => string | null;
|
|
449
|
-
getAssetsDir: () => string | undefined;
|
|
450
385
|
registerBundleGraphAdder: (adder: BundleGraphAdder) => void;
|
|
386
|
+
/** Register a callback that fires for each segment emitted during transform. */
|
|
387
|
+
onSegment: (callback: SegmentCallback) => void;
|
|
388
|
+
/** @internal */
|
|
389
|
+
_oldDevSsrServer: () => boolean | undefined;
|
|
451
390
|
}
|
|
452
391
|
|
|
453
392
|
declare interface QwikVitePluginCommonOptions {
|
|
@@ -501,29 +440,12 @@ declare interface QwikVitePluginCommonOptions {
|
|
|
501
440
|
* before bundling.
|
|
502
441
|
*/
|
|
503
442
|
transformedModuleOutput?: ((transformedModules: TransformModule[]) => Promise<void> | void) | null;
|
|
504
|
-
devTools?:
|
|
505
|
-
/**
|
|
506
|
-
* Validates image sizes for CLS issues during development. In case of issues, provides you with
|
|
507
|
-
* a correct image size resolutions. If set to `false`, image dev tool will be disabled.
|
|
508
|
-
*
|
|
509
|
-
* Default `true`
|
|
510
|
-
*/
|
|
511
|
-
imageDevTools?: boolean | true;
|
|
512
|
-
/**
|
|
513
|
-
* Press-hold the defined keys to enable qwik dev inspector. By default the behavior is
|
|
514
|
-
* activated by pressing the left or right `Alt` key. If set to `false`, qwik dev inspector will
|
|
515
|
-
* be disabled.
|
|
516
|
-
*
|
|
517
|
-
* Valid values are `KeyboardEvent.code` values. Please note that the 'Left' and 'Right'
|
|
518
|
-
* suffixes are ignored.
|
|
519
|
-
*/
|
|
520
|
-
clickToSource?: string[] | false;
|
|
521
|
-
};
|
|
443
|
+
devTools?: QwikPluginDevTools;
|
|
522
444
|
/**
|
|
523
445
|
* Predicate function to filter out files from the optimizer. hook for resolveId, load, and
|
|
524
446
|
* transform
|
|
525
447
|
*/
|
|
526
|
-
fileFilter?: (id: string, hook:
|
|
448
|
+
fileFilter?: (id: string, hook: keyof Plugin_2) => boolean;
|
|
527
449
|
/**
|
|
528
450
|
* Run eslint on the source files for the ssr build or dev server. This can slow down startup on
|
|
529
451
|
* large projects. Defaults to `true`
|
|
@@ -571,13 +493,6 @@ declare interface QwikVitePluginSSROptions extends QwikVitePluginCommonOptions {
|
|
|
571
493
|
* Default `src/components/app/app.tsx`
|
|
572
494
|
*/
|
|
573
495
|
input?: string[] | string;
|
|
574
|
-
/**
|
|
575
|
-
* Entry input for client-side only development with hot-module reloading. This is for Vite
|
|
576
|
-
* development only and does not use SSR.
|
|
577
|
-
*
|
|
578
|
-
* Default `src/entry.dev.tsx`
|
|
579
|
-
*/
|
|
580
|
-
devInput?: string;
|
|
581
496
|
/**
|
|
582
497
|
* Output directory for the client build.
|
|
583
498
|
*
|
|
@@ -592,15 +507,7 @@ declare interface QwikVitePluginSSROptions extends QwikVitePluginCommonOptions {
|
|
|
592
507
|
*/
|
|
593
508
|
manifestOutput?: (manifest: QwikManifest) => Promise<void> | void;
|
|
594
509
|
};
|
|
595
|
-
/**
|
|
596
|
-
* Qwik is SSR first framework. This means that Qwik requires either SSR or SSG. In dev mode the
|
|
597
|
-
* dev SSR server is responsible for rendering and pausing the application on the server.
|
|
598
|
-
*
|
|
599
|
-
* Under normal circumstances this should be on, unless you have your own SSR server which you
|
|
600
|
-
* would like to use instead and wish to disable this one.
|
|
601
|
-
*
|
|
602
|
-
* Default: true
|
|
603
|
-
*/
|
|
510
|
+
/** @deprecated Use the `devSsrServer` option of the qwikRouter() plugin instead. */
|
|
604
511
|
devSsrServer?: boolean;
|
|
605
512
|
/** Controls the SSR behavior. */
|
|
606
513
|
ssr?: {
|
|
@@ -626,6 +533,8 @@ declare interface QwikVitePluginSSROptions extends QwikVitePluginCommonOptions {
|
|
|
626
533
|
* Default `undefined`
|
|
627
534
|
*/
|
|
628
535
|
manifestInput?: QwikManifest;
|
|
536
|
+
/** Same as `manifestInput` but allows passing the path to the file. */
|
|
537
|
+
manifestInputPath?: string;
|
|
629
538
|
};
|
|
630
539
|
}
|
|
631
540
|
|
|
@@ -638,34 +547,7 @@ export declare interface ResolvedManifest {
|
|
|
638
547
|
}
|
|
639
548
|
|
|
640
549
|
/** @public */
|
|
641
|
-
declare
|
|
642
|
-
origin: string;
|
|
643
|
-
name: string;
|
|
644
|
-
entry: string | null;
|
|
645
|
-
displayName: string;
|
|
646
|
-
hash: string;
|
|
647
|
-
canonicalFilename: string;
|
|
648
|
-
extension: string;
|
|
649
|
-
parent: string | null;
|
|
650
|
-
ctxKind: 'eventHandler' | 'function';
|
|
651
|
-
ctxName: string;
|
|
652
|
-
captures: boolean;
|
|
653
|
-
loc: [number, number];
|
|
654
|
-
/** The parameter names if it's a function with parameters */
|
|
655
|
-
paramNames?: string[];
|
|
656
|
-
/** The transformed names of scoped variables, if any */
|
|
657
|
-
captureNames?: string[];
|
|
658
|
-
}
|
|
659
|
-
export { SegmentAnalysis as HookAnalysis }
|
|
660
|
-
export { SegmentAnalysis }
|
|
661
|
-
|
|
662
|
-
/** @public */
|
|
663
|
-
declare interface SegmentEntryStrategy {
|
|
664
|
-
type: 'segment';
|
|
665
|
-
manual?: Record<string, string>;
|
|
666
|
-
}
|
|
667
|
-
export { SegmentEntryStrategy as HookEntryStrategy }
|
|
668
|
-
export { SegmentEntryStrategy }
|
|
550
|
+
declare type SegmentCallback = (parentId: string, segment: SegmentAnalysis) => void;
|
|
669
551
|
|
|
670
552
|
/**
|
|
671
553
|
* The manifest values that are needed for SSR.
|
|
@@ -674,106 +556,13 @@ export { SegmentEntryStrategy }
|
|
|
674
556
|
*/
|
|
675
557
|
export declare type ServerQwikManifest = Pick<QwikManifest, 'manifestHash' | 'injections' | 'bundleGraph' | 'bundleGraphAsset' | 'mapping' | 'preloader' | 'core' | 'qwikLoader'>;
|
|
676
558
|
|
|
677
|
-
/** @public */
|
|
678
|
-
export declare interface SingleEntryStrategy {
|
|
679
|
-
type: 'single';
|
|
680
|
-
manual?: Record<string, string>;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
/** @public */
|
|
684
|
-
export declare interface SmartEntryStrategy {
|
|
685
|
-
type: 'smart';
|
|
686
|
-
manual?: Record<string, string>;
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
/** @public */
|
|
690
|
-
export declare interface SourceLocation {
|
|
691
|
-
hi: number;
|
|
692
|
-
lo: number;
|
|
693
|
-
startLine: number;
|
|
694
|
-
startCol: number;
|
|
695
|
-
endLine: number;
|
|
696
|
-
endCol: number;
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
/** @public */
|
|
700
|
-
export declare type SourceMapsOption = 'external' | 'inline' | undefined | null;
|
|
701
|
-
|
|
702
559
|
/** @public */
|
|
703
560
|
export declare type SymbolMapper = Record<string, readonly [symbol: string, chunk: string]>;
|
|
704
561
|
|
|
705
|
-
/**
|
|
706
|
-
* @beta
|
|
707
|
-
* For a given symbol (QRL such as `onKeydown$`) the server needs to know which bundle the symbol is in.
|
|
708
|
-
*
|
|
709
|
-
* Normally this is provided by Qwik's `q-manifest` . But `q-manifest` only exists after a full client build.
|
|
710
|
-
*
|
|
711
|
-
* This would be a problem in dev mode. So in dev mode the symbol is mapped to the expected URL using the symbolMapper function below. For Vite the given path is fixed for a given symbol.
|
|
712
|
-
*/
|
|
713
|
-
export declare let symbolMapper: ReturnType<typeof createSymbolMapper>;
|
|
714
|
-
|
|
715
562
|
/** @public */
|
|
716
563
|
export declare type SymbolMapperFn = (symbolName: string, mapper: SymbolMapper | undefined, parent?: string) => readonly [symbol: string, chunk: string] | undefined;
|
|
717
564
|
|
|
718
|
-
/** @public */
|
|
719
|
-
export declare type SystemEnvironment = 'node' | 'deno' | 'bun' | 'webworker' | 'browsermain' | 'unknown';
|
|
720
|
-
|
|
721
|
-
/** @public */
|
|
722
|
-
export declare interface TransformModule {
|
|
723
|
-
path: string;
|
|
724
|
-
isEntry: boolean;
|
|
725
|
-
code: string;
|
|
726
|
-
map: string | null;
|
|
727
|
-
segment: SegmentAnalysis | null;
|
|
728
|
-
origPath: string | null;
|
|
729
|
-
}
|
|
730
565
|
|
|
731
|
-
|
|
732
|
-
export declare interface TransformModuleInput {
|
|
733
|
-
path: string;
|
|
734
|
-
devPath?: string;
|
|
735
|
-
code: string;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
/** @public */
|
|
739
|
-
export declare interface TransformModulesOptions extends TransformOptions {
|
|
740
|
-
input: TransformModuleInput[];
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
/** @public */
|
|
744
|
-
export declare interface TransformOptions {
|
|
745
|
-
srcDir: string;
|
|
746
|
-
rootDir?: string;
|
|
747
|
-
entryStrategy?: EntryStrategy;
|
|
748
|
-
minify?: MinifyMode;
|
|
749
|
-
sourceMaps?: boolean;
|
|
750
|
-
transpileTs?: boolean;
|
|
751
|
-
transpileJsx?: boolean;
|
|
752
|
-
preserveFilenames?: boolean;
|
|
753
|
-
explicitExtensions?: boolean;
|
|
754
|
-
mode?: EmitMode;
|
|
755
|
-
scope?: string;
|
|
756
|
-
stripExports?: string[];
|
|
757
|
-
regCtxName?: string[];
|
|
758
|
-
stripCtxName?: string[];
|
|
759
|
-
stripEventHandlers?: boolean;
|
|
760
|
-
isServer?: boolean;
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
/** @public */
|
|
764
|
-
export declare interface TransformOutput {
|
|
765
|
-
modules: TransformModule[];
|
|
766
|
-
diagnostics: Diagnostic[];
|
|
767
|
-
isTypeScript: boolean;
|
|
768
|
-
isJsx: boolean;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
/** @public */
|
|
772
|
-
export declare type TranspileOption = boolean | undefined | null;
|
|
773
|
-
|
|
774
|
-
/** @public */
|
|
775
|
-
export declare const versions: {
|
|
776
|
-
qwik: string;
|
|
777
|
-
};
|
|
566
|
+
export * from "@qwik.dev/optimizer";
|
|
778
567
|
|
|
779
568
|
export { }
|