Skip to content

Commit 5b16129

Browse files
authored
fix(v2): fixup after main merge (#7568)
fixup
1 parent febcc54 commit 5b16129

File tree

9 files changed

+17
-10
lines changed

9 files changed

+17
-10
lines changed

packages/docs/src/routes/docs/(qwik)/advanced/custom-build-dir/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Usually with Vite.js we do it like this:
2424
```ts title="vite.config.mts"
2525
import { defineConfig } from 'vite';
2626
import { qwikVite } from '@qwik.dev/core/optimizer';
27-
import { qwikRouter } from '@qwik.dev/router';
27+
import { qwikRouter } from '@qwik.dev/router/vite';
2828
import { resolve } from 'node:path';
2929
/* VITE_IMPORTS */
3030

@@ -59,7 +59,7 @@ So instead of changing the settings in Vite.js directly, we just need to change
5959
```ts title="vite.config.mts"
6060
import { defineConfig } from 'vite';
6161
import { qwikVite } from '@qwik.dev/core/optimizer';
62-
import { qwikRouter } from '@qwik.dev/router';
62+
import { qwikRouter } from '@qwik.dev/router/vite';
6363
import tsconfigPaths from 'vite-tsconfig-paths';
6464

6565
export default defineConfig(() => {

packages/docs/src/routes/docs/(qwik)/advanced/vite/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Qwik comes with two plugins that make it easy to use Vite with Qwik and Qwik Rou
3131

3232
```ts title="vite.config.mts"
3333
import { defineConfig } from 'vite';
34-
import { qwikRouter } from '@qwik.dev/router';
34+
import { qwikRouter } from '@qwik.dev/router/vite';
3535
import { qwikVite } from '@qwik.dev/core/optimizer';
3636
import tsconfigPaths from 'vite-tsconfig-paths';
3737

packages/docs/src/routes/docs/(qwikrouter)/guides/mdx/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ These plugins can be disabled independently in the following way:
101101

102102
```tsx title="vite.config.js"
103103
import { defineConfig } from 'vite';
104-
import { qwikRouter } from '@qwik.dev/router';
104+
import { qwikRouter } from '@qwik.dev/router/vite';
105105
// See below
106106
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
107107
export default defineConfig(() => {

packages/docs/src/routes/docs/(qwikrouter)/routing/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ You can set the rewrite rules as follows in your `vite.config.mts`:
398398

399399
```tsx
400400
import { defineConfig } from 'vite';
401-
import { qwikRouter } from '@qwik.dev/router';
401+
import { qwikRouter } from '@qwik.dev/router/vite';
402402

403403
export default defineConfig(async () => {
404404
return {

packages/qwik/src/optimizer/src/manifest.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,11 @@ export function generateManifestFromBundles(
475475
.map((m) => path.relative(opts.rootDir, m));
476476
if (modulePaths.length > 0) {
477477
bundle.origins = modulePaths;
478-
if (modulePaths.some((m) => /\/(core|qwik)\/dist\/preloader\.[cm]js$/.test(m))) {
478+
if (modulePaths.some((m) => /[/\\](core|qwik)[/\\]dist[/\\]preloader\.[cm]js/.test(m))) {
479479
manifest.preloader = bundleFileName;
480-
} else if (modulePaths.some((m) => /\/(core|qwik)\/dist\/core(\.prod)?\.[cm]js$/.test(m))) {
480+
} else if (
481+
modulePaths.some((m) => /[/\\](core|qwik)[/\\]dist[/\\]core(\.prod)?\.[cm]js/.test(m))
482+
) {
481483
qwikBundleName = bundleFileName;
482484
}
483485
}

packages/qwik/src/optimizer/src/plugins/bundle-graph.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ export function convertManifestToBundleGraph(
4545
// All known chunks and symbols
4646
const graph = { ...manifest.bundles };
4747
for (const [symbol, bundleName] of Object.entries(manifest.mapping)) {
48+
if (symbol.startsWith('_') && symbol.length < 10) {
49+
// internal QRLs are not included in the bundle graph
50+
continue;
51+
}
4852
const hash = getSymbolHash(symbol);
4953
if (hash) {
5054
/**

packages/qwik/src/optimizer/src/plugins/plugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,8 @@ export const manifest = ${JSON.stringify(serverManifest)};\n`;
953953
// the vite preload helper must be included or to prevent breaking circular dependencies
954954
if (
955955
opts.target === 'client' &&
956-
(/\/(core|qwik)\/dist\/preloader\.[cm]js/.test(id) || id === '\0vite/preload-helper.js')
956+
(/[/\\](core|qwik)[/\\]dist[/\\]preloader\.[cm]js/.test(id) ||
957+
id === '\0vite/preload-helper.js')
957958
) {
958959
return 'qwik-preloader';
959960
}

packages/qwik/src/testing/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//vite.config.mts
55
import { defineConfig } from 'vite';
66
import { qwikVite } from '@qwik.dev/core/optimizer';
7-
import { qwikRouter } from '@qwik.dev/router';
7+
import { qwikRouter } from '@qwik.dev/router/vite';
88
import tsconfigPaths from 'vite-tsconfig-paths';
99

1010
export default defineConfig(() => {

starters/apps/base/vite.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* When building, the adapter config is used which loads this file and extends it.
44
*/
55
import { qwikVite } from "@qwik.dev/core/optimizer";
6-
import { qwikRouter } from "@qwik.dev/router";
6+
import { qwikRouter } from "@qwik.dev/router/vite";
77
import { defineConfig, type UserConfig } from "vite";
88
import tsconfigPaths from "vite-tsconfig-paths";
99
import pkg from "./package.json";

0 commit comments

Comments
 (0)