@qwik.dev/core 2.0.0-alpha.8 → 2.0.0-beta.1
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/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 +27 -27
- package/bindings/qwik.wasm.mjs +27 -27
- package/bindings/qwik.win32-x64-msvc.node +0 -0
- package/bindings/qwik_wasm_bg.wasm +0 -0
- package/dist/build/index.cjs +3 -3
- package/dist/build/index.d.ts +22 -22
- package/dist/build/package.json +1 -1
- package/dist/cli.cjs +6 -6
- package/dist/core-internal.d.ts +4447 -3941
- package/dist/core.cjs +7974 -7742
- package/dist/core.cjs.map +1 -1
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +7960 -7738
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.cjs +3839 -3777
- package/dist/core.prod.mjs +4183 -4168
- package/dist/insights/index.qwik.cjs +1 -4260
- package/dist/insights/index.qwik.mjs +63 -4251
- package/dist/insights/vite/index.cjs +1 -82
- package/dist/insights/vite/index.mjs +65 -37
- package/dist/insights/vite.d.ts +22 -0
- package/dist/{insights/insights.d.ts → insights.d.ts} +33 -22
- package/dist/loader/index.cjs +2 -2
- package/dist/loader/index.mjs +2 -2
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.cjs +599 -370
- package/dist/optimizer.d.ts +779 -707
- package/dist/optimizer.mjs +595 -414
- package/dist/preloader.cjs +269 -0
- package/dist/preloader.mjs +198 -0
- package/dist/qwikloader.debug.js +242 -222
- package/dist/qwikloader.js +1 -3
- package/dist/server.cjs +676 -574
- package/dist/server.d.ts +504 -402
- package/dist/server.mjs +647 -549
- package/dist/starters/adapters/aws-lambda/serverless.yml +15 -0
- package/dist/starters/adapters/aws-lambda/src/entry_aws-lambda.tsx +0 -2
- package/dist/starters/adapters/azure-swa/public/staticwebapp.config.json +7 -0
- package/dist/starters/adapters/azure-swa/src/entry.azure-swa.tsx +1 -2
- package/dist/starters/adapters/bun/src/entry.bun.ts +3 -2
- package/dist/starters/adapters/cloud-run/src/entry.cloud-run.tsx +1 -3
- package/dist/starters/adapters/cloudflare-pages/public/_headers +2 -0
- package/dist/starters/adapters/cloudflare-pages/src/entry.cloudflare-pages.tsx +1 -2
- package/dist/starters/adapters/deno/src/entry.deno.ts +3 -2
- package/dist/starters/adapters/express/src/entry.express.tsx +5 -2
- package/dist/starters/adapters/fastify/src/entry.fastify.tsx +2 -1
- package/dist/starters/adapters/fastify/src/plugins/fastify-qwik.ts +9 -1
- package/dist/starters/adapters/firebase/firebase.json +12 -1
- package/dist/starters/adapters/firebase/functions/index.js +2 -3
- package/dist/starters/adapters/firebase/src/entry-firebase.tsx +1 -2
- package/dist/starters/adapters/netlify-edge/public/_headers +2 -0
- package/dist/starters/adapters/netlify-edge/src/entry.netlify-edge.tsx +1 -2
- package/dist/starters/adapters/node-server/src/entry.node-server.tsx +3 -2
- package/dist/starters/adapters/static/README.md +4 -0
- package/dist/starters/adapters/vercel-edge/src/entry.vercel-edge.tsx +1 -2
- package/dist/starters/adapters/vercel-edge/vercel.json +1 -1
- package/dist/starters/features/auth/package.json +1 -1
- package/dist/starters/features/bootstrap/src/routes/bootstrap/layout.tsx +0 -11
- package/dist/starters/features/localize/src/entry.ssr.tsx +0 -2
- package/dist/starters/features/localize/src/routes/[locale]/i18n-utils.ts +1 -1
- package/dist/starters/features/partytown/package.json +4 -4
- package/dist/starters/features/partytown/src/components/partytown/partytown.tsx +2 -2
- package/dist/starters/features/postcss/postcss.config.js +1 -1
- package/dist/starters/features/service-worker/package.json +13 -0
- package/dist/starters/features/service-worker/src/routes/service-worker.ts +14 -0
- package/dist/starters/features/styled-vanilla-extract/package.json +2 -1
- package/dist/starters/features/tailwind/package.json +4 -3
- package/dist/starters/features/tailwind/src/global.css +1 -1
- package/dist/starters/features/tailwind-v3/.vscode/settings.json +3 -0
- package/dist/starters/features/tailwind-v3/package.json +21 -0
- package/dist/starters/features/tailwind-v3/postcss.config.cjs +6 -0
- package/dist/starters/features/tailwind-v3/src/global.css +7 -0
- package/dist/starters/features/tailwind-v3/tailwind.config.js +8 -0
- package/dist/testing/index.cjs +8390 -8048
- package/dist/testing/index.d.ts +141 -140
- package/dist/testing/index.mjs +8378 -8044
- package/dist/testing/package.json +1 -1
- package/package.json +19 -11
- package/public.d.ts +10 -0
- package/server.d.ts +1 -0
- package/dist/insights/index.d.ts +0 -1
- package/dist/insights/vite/index.d.ts +0 -1
- package/dist/insights/vite/insights-plugin.d.ts +0 -10
- package/dist/prefetch/index.cjs +0 -4
- package/dist/prefetch/index.d.ts +0 -2
- package/dist/prefetch/index.mjs +0 -3
- package/dist/prefetch/package.json +0 -8
- package/dist/qwik-prefetch.debug.js +0 -244
- package/dist/qwik-prefetch.js +0 -1
|
@@ -18,6 +18,21 @@ functions:
|
|
|
18
18
|
custom:
|
|
19
19
|
serverless-offline:
|
|
20
20
|
httpPort: 4000
|
|
21
|
+
serverless-http:
|
|
22
|
+
# Make sure serverless-http serves files correctly
|
|
23
|
+
binary:
|
|
24
|
+
contentTypes:
|
|
25
|
+
- "application/javascript"
|
|
26
|
+
- "text/javascript"
|
|
27
|
+
- "application/json"
|
|
28
|
+
- "text/html"
|
|
29
|
+
- "text/css"
|
|
30
|
+
- "image/*"
|
|
31
|
+
- "font/*"
|
|
32
|
+
# the js files under build have hash names and are immutable
|
|
33
|
+
cacheControl:
|
|
34
|
+
- pattern: "build/**/*.js"
|
|
35
|
+
value: "public, max-age=31536000, immutable"
|
|
21
36
|
|
|
22
37
|
package:
|
|
23
38
|
excludeDevDependencies: true
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* - https://qwik.dev/docs/deployments/aws/
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import { manifest } from "@qwik-client-manifest";
|
|
11
10
|
import qwikRouterConfig from "@qwik-router-config";
|
|
12
11
|
import {
|
|
13
12
|
createQwikRouter,
|
|
@@ -24,7 +23,6 @@ declare global {
|
|
|
24
23
|
export const { handle } = createQwikRouter({
|
|
25
24
|
render,
|
|
26
25
|
qwikRouterConfig,
|
|
27
|
-
manifest,
|
|
28
26
|
});
|
|
29
27
|
|
|
30
28
|
export const qwikApp = serverless({ handle }, { binary: true });
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* - https://qwik.dev/docs/deployments/azure-swa/
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import { manifest } from "@qwik-client-manifest";
|
|
11
10
|
import qwikRouterConfig from "@qwik-router-config";
|
|
12
11
|
import {
|
|
13
12
|
createQwikRouter,
|
|
@@ -19,4 +18,4 @@ declare global {
|
|
|
19
18
|
interface QwikRouterPlatform extends PlatformAzure {}
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
export default createQwikRouter({ render, qwikRouterConfig
|
|
21
|
+
export default createQwikRouter({ render, qwikRouterConfig });
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* - https://bun.sh/docs/api/http
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
import { manifest } from "@qwik-client-manifest";
|
|
12
11
|
import qwikRouterConfig from "@qwik-router-config";
|
|
13
12
|
import { createQwikRouter } from "@qwik.dev/router/middleware/bun";
|
|
14
13
|
import render from "./entry.ssr";
|
|
@@ -17,7 +16,9 @@ import render from "./entry.ssr";
|
|
|
17
16
|
const { router, notFound, staticFile } = createQwikRouter({
|
|
18
17
|
render,
|
|
19
18
|
qwikRouterConfig,
|
|
20
|
-
|
|
19
|
+
static: {
|
|
20
|
+
cacheControl: "public, max-age=31536000, immutable",
|
|
21
|
+
},
|
|
21
22
|
});
|
|
22
23
|
|
|
23
24
|
// Allow for dynamic port
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* - https://qwik.dev/docs/deployments/gcp-cloud-run/
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import { manifest } from "@qwik-client-manifest";
|
|
11
10
|
import qwikRouterConfig from "@qwik-router-config";
|
|
12
11
|
import {
|
|
13
12
|
createQwikRouter,
|
|
@@ -52,9 +51,8 @@ const DEFAULT_HEADERS = {
|
|
|
52
51
|
const { router, notFound, staticFile } = createQwikRouter({
|
|
53
52
|
render,
|
|
54
53
|
qwikRouterConfig,
|
|
55
|
-
manifest,
|
|
56
54
|
static: {
|
|
57
|
-
cacheControl: "public, max-age=
|
|
55
|
+
cacheControl: "public, max-age=31536000, immutable",
|
|
58
56
|
},
|
|
59
57
|
getOrigin(req) {
|
|
60
58
|
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* - https://qwik.dev/docs/deployments/cloudflare-pages/
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import { manifest } from "@qwik-client-manifest";
|
|
11
10
|
import qwikRouterConfig from "@qwik-router-config";
|
|
12
11
|
import {
|
|
13
12
|
createQwikRouter,
|
|
@@ -19,6 +18,6 @@ declare global {
|
|
|
19
18
|
interface QwikRouterPlatform extends PlatformCloudflarePages {}
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
const fetch = createQwikRouter({ render, qwikRouterConfig
|
|
21
|
+
const fetch = createQwikRouter({ render, qwikRouterConfig });
|
|
23
22
|
|
|
24
23
|
export { fetch };
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* - https://docs.deno.com/runtime/tutorials/http_server
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
import { manifest } from "@qwik-client-manifest";
|
|
12
11
|
import qwikRouterConfig from "@qwik-router-config";
|
|
13
12
|
import { createQwikRouter } from "@qwik.dev/router/middleware/deno";
|
|
14
13
|
import render from "./entry.ssr";
|
|
@@ -17,7 +16,9 @@ import render from "./entry.ssr";
|
|
|
17
16
|
const { router, notFound, staticFile } = createQwikRouter({
|
|
18
17
|
render,
|
|
19
18
|
qwikRouterConfig,
|
|
20
|
-
|
|
19
|
+
static: {
|
|
20
|
+
cacheControl: "public, max-age=31536000, immutable",
|
|
21
|
+
},
|
|
21
22
|
});
|
|
22
23
|
|
|
23
24
|
// Allow for dynamic port
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* - https://qwik.dev/docs/deployments/node/
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import { manifest } from "@qwik-client-manifest";
|
|
11
10
|
import qwikRouterConfig from "@qwik-router-config";
|
|
12
11
|
import {
|
|
13
12
|
createQwikRouter,
|
|
@@ -26,6 +25,7 @@ declare global {
|
|
|
26
25
|
// Directories where the static assets are located
|
|
27
26
|
const distDir = join(fileURLToPath(import.meta.url), "..", "..", "dist");
|
|
28
27
|
const buildDir = join(distDir, "build");
|
|
28
|
+
const assetsDir = join(distDir, "assets");
|
|
29
29
|
|
|
30
30
|
// Allow for dynamic port
|
|
31
31
|
const PORT = process.env.PORT ?? 3000;
|
|
@@ -34,7 +34,6 @@ const PORT = process.env.PORT ?? 3000;
|
|
|
34
34
|
const { router, notFound } = createQwikRouter({
|
|
35
35
|
render,
|
|
36
36
|
qwikRouterConfig,
|
|
37
|
-
manifest,
|
|
38
37
|
// getOrigin(req) {
|
|
39
38
|
// // If deploying under a proxy, you may need to build the origin from the request headers
|
|
40
39
|
// // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto
|
|
@@ -55,6 +54,10 @@ const app = express();
|
|
|
55
54
|
// Static asset handlers
|
|
56
55
|
// https://expressjs.com/en/starter/static-files.html
|
|
57
56
|
app.use(`/build`, express.static(buildDir, { immutable: true, maxAge: "1y" }));
|
|
57
|
+
app.use(
|
|
58
|
+
`/assets`,
|
|
59
|
+
express.static(assetsDir, { immutable: true, maxAge: "1y" }),
|
|
60
|
+
);
|
|
58
61
|
app.use(express.static(distDir, { redirect: false }));
|
|
59
62
|
|
|
60
63
|
// Use Qwik Router's page and endpoint request handler
|
|
@@ -21,6 +21,7 @@ declare global {
|
|
|
21
21
|
// Directories where the static assets are located
|
|
22
22
|
const distDir = join(fileURLToPath(import.meta.url), "..", "..", "dist");
|
|
23
23
|
const buildDir = join(distDir, "build");
|
|
24
|
+
const assetsDir = join(distDir, "assets");
|
|
24
25
|
|
|
25
26
|
// Allow for dynamic port and host
|
|
26
27
|
const PORT = parseInt(process.env.PORT ?? "3000");
|
|
@@ -39,7 +40,7 @@ const start = async () => {
|
|
|
39
40
|
// await fastify.register(import('@fastify/compress'))
|
|
40
41
|
|
|
41
42
|
// Handle Qwik Router using a plugin
|
|
42
|
-
await fastify.register(FastifyQwik, { distDir, buildDir });
|
|
43
|
+
await fastify.register(FastifyQwik, { distDir, buildDir, assetsDir });
|
|
43
44
|
|
|
44
45
|
// Start the fastify server
|
|
45
46
|
await fastify.listen({ port: PORT, host: HOST });
|
|
@@ -9,6 +9,7 @@ import render from "../entry.ssr";
|
|
|
9
9
|
export interface FastifyQwikOptions {
|
|
10
10
|
distDir: string;
|
|
11
11
|
buildDir: string;
|
|
12
|
+
assetsDir: string;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
const { router, notFound } = createQwikRouter({ render, qwikRouterConfig });
|
|
@@ -17,7 +18,7 @@ const qwikPlugin: FastifyPluginAsync<FastifyQwikOptions> = async (
|
|
|
17
18
|
fastify,
|
|
18
19
|
options,
|
|
19
20
|
) => {
|
|
20
|
-
const { buildDir, distDir } = options;
|
|
21
|
+
const { buildDir, distDir, assetsDir } = options;
|
|
21
22
|
|
|
22
23
|
fastify.register(fastifyStatic, {
|
|
23
24
|
root: buildDir,
|
|
@@ -27,6 +28,13 @@ const qwikPlugin: FastifyPluginAsync<FastifyQwikOptions> = async (
|
|
|
27
28
|
decorateReply: false,
|
|
28
29
|
});
|
|
29
30
|
|
|
31
|
+
fastify.register(fastifyStatic, {
|
|
32
|
+
root: assetsDir,
|
|
33
|
+
prefix: "/assets",
|
|
34
|
+
immutable: true,
|
|
35
|
+
maxAge: "1y",
|
|
36
|
+
});
|
|
37
|
+
|
|
30
38
|
fastify.register(fastifyStatic, {
|
|
31
39
|
root: distDir,
|
|
32
40
|
redirect: false,
|
|
@@ -19,6 +19,17 @@
|
|
|
19
19
|
"function": "app"
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
|
-
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
|
|
22
|
+
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
|
|
23
|
+
"headers": [
|
|
24
|
+
{
|
|
25
|
+
"source": "build/**/*.js",
|
|
26
|
+
"headers": [
|
|
27
|
+
{
|
|
28
|
+
"key": "Cache-Control",
|
|
29
|
+
"value": "public, max-age=31536000, s-maxage=31536000, immutable"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
23
34
|
}
|
|
24
35
|
}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* - https://qwik.dev/docs/deployments/firebase/
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import { manifest } from "@qwik-client-manifest";
|
|
11
10
|
import qwikRouterConfig from "@qwik-router-config";
|
|
12
11
|
import {
|
|
13
12
|
createQwikRouter,
|
|
@@ -19,4 +18,4 @@ declare global {
|
|
|
19
18
|
interface QwikRouterPlatform extends PlatformFirebase {}
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
export default createQwikRouter({ render, qwikRouterConfig
|
|
21
|
+
export default createQwikRouter({ render, qwikRouterConfig });
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* - https://qwik.dev/docs/deployments/netlify-edge/
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import { manifest } from "@qwik-client-manifest";
|
|
11
10
|
import qwikRouterConfig from "@qwik-router-config";
|
|
12
11
|
import {
|
|
13
12
|
createQwikRouter,
|
|
@@ -19,4 +18,4 @@ declare global {
|
|
|
19
18
|
interface QwikRouterPlatform extends PlatformNetlify {}
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
export default createQwikRouter({ render, qwikRouterConfig
|
|
21
|
+
export default createQwikRouter({ render, qwikRouterConfig });
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* - https://qwik.dev/docs/deployments/node/
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import { manifest } from "@qwik-client-manifest";
|
|
11
10
|
import qwikRouterConfig from "@qwik-router-config";
|
|
12
11
|
import { createQwikRouter } from "@qwik.dev/router/middleware/node";
|
|
13
12
|
import { createServer } from "node:http";
|
|
@@ -20,7 +19,9 @@ const PORT = process.env.PORT ?? 3004;
|
|
|
20
19
|
const { router, notFound, staticFile } = createQwikRouter({
|
|
21
20
|
render,
|
|
22
21
|
qwikRouterConfig,
|
|
23
|
-
|
|
22
|
+
static: {
|
|
23
|
+
cacheControl: "public, max-age=31536000, immutable",
|
|
24
|
+
},
|
|
24
25
|
});
|
|
25
26
|
|
|
26
27
|
const server = createServer();
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
## Static Site Generator (Node.js)
|
|
2
2
|
|
|
3
|
+
Be sure to configure your server to serve very long cache headers for the `build/**/*.js` files.
|
|
4
|
+
|
|
5
|
+
Typically you'd set the `Cache-Control` header for those files to `public, max-age=31536000, immutable`.
|
|
6
|
+
|
|
3
7
|
```shell
|
|
4
8
|
npm run build.server
|
|
5
9
|
```
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* - https://qwik.dev/docs/deployments/vercel-edge/
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import { manifest } from "@qwik-client-manifest";
|
|
11
10
|
import qwikRouterConfig from "@qwik-router-config";
|
|
12
11
|
import {
|
|
13
12
|
createQwikRouter,
|
|
@@ -19,4 +18,4 @@ declare global {
|
|
|
19
18
|
interface QwikRouterPlatform extends PlatformVercel {}
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
export default createQwikRouter({ render, qwikRouterConfig
|
|
21
|
+
export default createQwikRouter({ render, qwikRouterConfig });
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"nextSteps": {
|
|
11
11
|
"lines": [
|
|
12
|
-
" Please add `optimizeDeps: { include: ['@auth/
|
|
12
|
+
" Please add `optimizeDeps: { include: ['@auth/qwik'] }`",
|
|
13
13
|
" to your vite.config.ts file.",
|
|
14
14
|
" Have a look at the docs for more info: ",
|
|
15
15
|
" https://qwik.dev/docs/integrations/authjs/"
|
|
@@ -6,17 +6,6 @@ import { Navbar } from "~/components/bootstrap";
|
|
|
6
6
|
|
|
7
7
|
import bootstrapStyles from "../../../node_modules/bootstrap/dist/css/bootstrap.min.css?inline";
|
|
8
8
|
|
|
9
|
-
export const onGet: RequestHandler = async ({ cacheControl }) => {
|
|
10
|
-
// Control caching for this request for best performance and to reduce hosting costs:
|
|
11
|
-
// https://qwik.dev/docs/caching/
|
|
12
|
-
cacheControl({
|
|
13
|
-
// Always serve a cached response by default, up to a week stale
|
|
14
|
-
staleWhileRevalidate: 60 * 60 * 24 * 7,
|
|
15
|
-
// Max once every 5 seconds, revalidate on the server to get a fresh version of this page
|
|
16
|
-
maxAge: 5,
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
|
|
20
9
|
export default component$(() => {
|
|
21
10
|
useStyles$(bootstrapStyles);
|
|
22
11
|
return (
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* - npm run build
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
import { manifest } from "@qwik-client-manifest";
|
|
14
13
|
import {
|
|
15
14
|
renderToStream,
|
|
16
15
|
type RenderToStreamOptions,
|
|
@@ -20,7 +19,6 @@ import { extractBase } from "./routes/[locale]/i18n-utils";
|
|
|
20
19
|
|
|
21
20
|
export default function (opts: RenderToStreamOptions) {
|
|
22
21
|
return renderToStream(<Root />, {
|
|
23
|
-
manifest,
|
|
24
22
|
...opts,
|
|
25
23
|
base: extractBase, // determine the base URL for the client code
|
|
26
24
|
// Use container attributes to set attributes on the html tag.
|
|
@@ -83,7 +83,7 @@ export function extractBase({ serverData }: RenderOptions): string {
|
|
|
83
83
|
export function useI18n() {
|
|
84
84
|
if (import.meta.env.DEV) {
|
|
85
85
|
// During development only, load all translations in memory when the app starts on the client.
|
|
86
|
-
|
|
86
|
+
|
|
87
87
|
useOnDocument("qinit", $(initTranslations));
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"namedImports": [
|
|
10
10
|
"partytownVite"
|
|
11
11
|
],
|
|
12
|
-
"importPath": "@
|
|
12
|
+
"importPath": "@qwik.dev/partytown/utils"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"namedImports": [
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
]
|
|
24
24
|
},
|
|
25
25
|
"docs": [
|
|
26
|
-
"https://partytown.
|
|
26
|
+
"https://partytown.qwik.dev/",
|
|
27
27
|
"https://qwik.dev/integrations/partytown/"
|
|
28
28
|
],
|
|
29
29
|
"nextSteps": {
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
" Please add the <QwikPartytown/> component",
|
|
32
32
|
" to your root.tsx file.",
|
|
33
33
|
" Have a look at the docs for more info: ",
|
|
34
|
-
" https://partytown.
|
|
34
|
+
" https://partytown.qwik.dev/configuration"
|
|
35
35
|
]
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@
|
|
39
|
+
"@qwik.dev/partytown": "^0.11.1"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PartytownConfig } from "@
|
|
2
|
-
import { partytownSnippet } from "@
|
|
1
|
+
import type { PartytownConfig } from "@qwik.dev/partytown/integration";
|
|
2
|
+
import { partytownSnippet } from "@qwik.dev/partytown/integration";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Props for `<QwikPartytown/>`, which extends the Partytown Config.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Add a service worker to your app",
|
|
3
|
+
"__qwik__": {
|
|
4
|
+
"displayName": "Feature: Service Worker",
|
|
5
|
+
"priority": 10,
|
|
6
|
+
"docs": [],
|
|
7
|
+
"nextSteps": {
|
|
8
|
+
"lines": [
|
|
9
|
+
"Now, make sure that you have `<ServiceWorkerRegister />` in your `src/root.tsx`. You can import it from `@qwik.dev/router`."
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WHAT IS THIS FILE?
|
|
3
|
+
*
|
|
4
|
+
* Any file called "service-worker" is automatically bundled and registered with Qwik Router, as long as you add `<RegisterServiceWorker />` in your `root.tsx`.
|
|
5
|
+
*
|
|
6
|
+
* Here you register the events that your service worker will handle.
|
|
7
|
+
*
|
|
8
|
+
* MDN has documentation at https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
|
|
9
|
+
*/
|
|
10
|
+
export declare const self: ServiceWorkerGlobalScope;
|
|
11
|
+
|
|
12
|
+
addEventListener("install", () => self.skipWaiting());
|
|
13
|
+
|
|
14
|
+
addEventListener("activate", () => self.clients.claim());
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "Use Tailwind in your Qwik app",
|
|
2
|
+
"description": "Use Tailwind v4 in your Qwik app",
|
|
3
3
|
"__qwik__": {
|
|
4
|
-
"displayName": "Integration: Tailwind (styling)",
|
|
4
|
+
"displayName": "Integration: Tailwind v4 (styling)",
|
|
5
5
|
"priority": -10,
|
|
6
6
|
"viteConfig": {
|
|
7
7
|
"imports": [
|
|
@@ -23,5 +23,6 @@
|
|
|
23
23
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
24
24
|
"tailwindcss": "^4.0.0",
|
|
25
25
|
"@tailwindcss/vite": "^4.0.0"
|
|
26
|
-
}
|
|
26
|
+
},
|
|
27
|
+
"type": "module"
|
|
27
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
1
|
+
@import "tailwindcss";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Use Tailwind v3 in your Qwik app",
|
|
3
|
+
"__qwik__": {
|
|
4
|
+
"displayName": "Integration: Tailwind v3 (styling)",
|
|
5
|
+
"priority": -10,
|
|
6
|
+
"viteConfig": {},
|
|
7
|
+
"docs": [
|
|
8
|
+
"https://qwik.dev/integrations/integration/tailwind/",
|
|
9
|
+
"https://tailwindcss.com/docs/utility-first"
|
|
10
|
+
],
|
|
11
|
+
"alwaysInRoot": [
|
|
12
|
+
".vscode"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"autoprefixer": "^10.4.19",
|
|
17
|
+
"postcss": "^8.4.39",
|
|
18
|
+
"prettier-plugin-tailwindcss": "^0.5.4",
|
|
19
|
+
"tailwindcss": "^3.4.17"
|
|
20
|
+
}
|
|
21
|
+
}
|