@@ -4,29 +4,29 @@ import { qwikNxVite } from 'qwik-nx/plugins';
44import { defineConfig } from 'vite' ;
55import tsconfigPaths from 'vite-tsconfig-paths' ;
66import { recmaProvideComponents } from './recma-provide-components' ;
7+ import { isDev } from '@builder.io/qwik/build' ;
78
89export default defineConfig ( async ( ) => {
910 const { default : rehypePrettyCode } = await import ( 'rehype-pretty-code' ) ;
1011 const { visit } = await import ( 'unist-util-visit' ) ;
1112
12- // Commented out for qwik v1.7.0
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- // }
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+ }
3030
3131 return {
3232 plugins : [
@@ -95,10 +95,9 @@ export default defineConfig(async () => {
9595 } ,
9696 build : {
9797 target : 'es2022' ,
98- // Commented out for qwik v1.7.0
99- // rollupOptions: {
100- // output,
101- // },
98+ rollupOptions : {
99+ output,
100+ } ,
102101 } ,
103102 preview : {
104103 headers : {
0 commit comments