Skip to content

Commit 358cec6

Browse files
authored
Merge pull request #7748 from QwikDev/v2-router-things
feat: refactor build configuration
2 parents bc6b37d + b1aaee4 commit 358cec6

File tree

156 files changed

+1064
-1164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+1064
-1164
lines changed

.changeset/all-cloths-hammer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@qwik.dev/core': minor
3+
---
4+
5+
FEAT: the QRL segment mapping during Vite dev mode now happens in core and does not require providing a separate `symbolMapper` function any more.

.changeset/green-drinks-strive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@qwik.dev/router': minor
3+
---
4+
5+
FEAT: qwikRouter middleware no longer needs qwikRouterConfig, it handles it internally

.changeset/large-houses-watch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@qwik.dev/core': patch
3+
---
4+
5+
FIX: the `srcInput` option to `qwikVite` is deprecated because it's unused.

.changeset/many-tips-win.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@qwik.dev/core': minor
3+
'@qwik.dev/router': patch
4+
---
5+
6+
FEAT: Server output chunk files are now under their own build/ subdir, like the client build. This makes it easier to override the chunk filenames. This is possible because the Router metadata files are now an earlier part of the build process.

.changeset/short-suits-bet.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@qwik.dev/core': minor
3+
---
4+
5+
FIX: `qwikVite` has better vite config handling around input files, and no longer writes the q-manifest file to a temp dir.

e2e/adapters-e2e/adapters/express/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default extendConfig(baseConfig, () => {
77
build: {
88
ssr: true,
99
rollupOptions: {
10-
input: ['src/entry.express.tsx', '@qwik-router-config'],
10+
input: ['src/entry.express.tsx'],
1111
},
1212
},
1313
plugins: [nodeServerAdapter({ name: 'express' })],

e2e/adapters-e2e/src/entry.express.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*/
1010
import { createQwikRouter } from '@qwik.dev/router/middleware/node';
1111
import 'dotenv/config';
12-
import qwikRouterConfig from '@qwik-router-config';
1312
import render from './entry.ssr';
1413
import express from 'express';
1514
import { fileURLToPath } from 'node:url';
@@ -25,7 +24,6 @@ const PORT = process.env.PORT ?? 3000;
2524
// Create the Qwik City Node middleware
2625
const { router, notFound } = createQwikRouter({
2726
render,
28-
qwikRouterConfig,
2927
// getOrigin(req) {
3028
// // If deploying under a proxy, you may need to build the origin from the request headers
3129
// // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto

e2e/adapters-e2e/src/entry.preview.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
*
1212
*/
1313
import { createQwikRouter } from '@qwik.dev/router/middleware/node';
14-
import qwikRouterConfig from '@qwik-router-config';
1514
// make sure qwikCityPlan is imported before entry
1615
import render from './entry.ssr';
1716

1817
/** The default export is the QwikCity adapter used by Vite preview. */
19-
export default createQwikRouter({ render, qwikRouterConfig });
18+
export default createQwikRouter({ render });

e2e/adapters-e2e/tests/express.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
import { expect, test } from '@playwright/test';
22

3+
test.beforeEach(async ({ page }) => {
4+
page.on('console', (msg) => {
5+
// eslint-disable-next-line no-console
6+
console.log(`[browser ${msg.type()}] ${msg.text()}`);
7+
});
8+
});
9+
310
test.describe('Verifying Express Adapter', () => {
411
test('should ignore unknown qdata', async ({ page, request }) => {
512
page.goto('/');

packages/docs/adapters/cloudflare-pages/vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default extendConfig(baseConfig, () => {
77
build: {
88
ssr: true,
99
rollupOptions: {
10-
input: ['src/entry.cloudflare-pages.tsx', '@qwik-router-config'],
10+
input: ['src/entry.cloudflare-pages.tsx'],
1111
},
1212
minify: false,
1313
},
@@ -18,7 +18,7 @@ export default extendConfig(baseConfig, () => {
1818
exclude: ['/demo/*', '/shop/*'],
1919
origin:
2020
(process.env.CF_PAGES_BRANCH !== 'main' ? process.env.CF_PAGES_URL : null) ??
21-
'https://qwik.builder.io',
21+
'https://qwik.dev',
2222
},
2323
}),
2424
],

0 commit comments

Comments
 (0)