Skip to content

Commit 9ed3a75

Browse files
committed
chore(website): comment out vite config trick to se chunk names
1 parent 6fc058b commit 9ed3a75

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

apps/website/vite.config.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@ import { qwikNxVite } from 'qwik-nx/plugins';
44
import { defineConfig } from 'vite';
55
import tsconfigPaths from 'vite-tsconfig-paths';
66
import { recmaProvideComponents } from './recma-provide-components';
7-
import { isDev } from '@builder.io/qwik/build';
87

98
export default defineConfig(async () => {
109
const { default: rehypePrettyCode } = await import('rehype-pretty-code');
1110
const { visit } = await import('unist-util-visit');
1211

13-
let output: any = {};
14-
if (!isDev) {
15-
// Client-specific configuration
16-
output = {
17-
// Customize the client build structure
18-
entryFileNames: ({ name }: any) => {
19-
if (name.startsWith('entry')) {
20-
return '[name].js';
21-
}
22-
return `build/[name]-[hash].js`;
23-
},
24-
chunkFileNames: () => {
25-
return `build/[name]-[hash].js`;
26-
},
27-
assetFileNames: `build/[name]-[hash].[ext]`,
28-
};
29-
}
12+
// commented out as doesn't seem to work with import.meta.glob eager:false in preview
13+
// let output: any = {};
14+
// if (!isDev) {
15+
// // Client-specific configuration
16+
// output = {
17+
// // Customize the client build structure
18+
// entryFileNames: ({ name }: any) => {
19+
// if (name.startsWith('entry')) {
20+
// return '[name].mjs';
21+
// }
22+
// return `[name]-[hash].js`;
23+
// },
24+
// chunkFileNames: () => {
25+
// return `[name]-[hash].js`;
26+
// },
27+
// assetFileNames: `build/[name]-[hash].[ext]`,
28+
// };
29+
// }
3030

3131
return {
3232
plugins: [
@@ -96,7 +96,7 @@ export default defineConfig(async () => {
9696
build: {
9797
target: 'es2022',
9898
rollupOptions: {
99-
output,
99+
// output,
100100
},
101101
},
102102
preview: {

0 commit comments

Comments
 (0)