@@ -29,7 +29,7 @@ export function defaultConfig(): Readonly<RequiredConfig> {
29
29
ssr : { } ,
30
30
plugins : [ ] ,
31
31
css : {
32
- cache : false ,
32
+ cache : true ,
33
33
modules : { } ,
34
34
postcss : { plugins : [ 'autoprefixer' ] } ,
35
35
} ,
@@ -41,7 +41,7 @@ export function defaultConfig(): Readonly<RequiredConfig> {
41
41
} ,
42
42
react : {
43
43
version : defaultReactVersion ,
44
- esmShBuildVersion : 52 ,
44
+ esmShBuildVersion : 53 ,
45
45
}
46
46
}
47
47
}
@@ -74,7 +74,6 @@ export async function loadConfig(specifier: string): Promise<Config> {
74
74
plugins,
75
75
css,
76
76
server,
77
- env,
78
77
} = data
79
78
if ( isFramework ( framework ) ) {
80
79
config . framework = framework
@@ -112,13 +111,13 @@ export async function loadConfig(specifier: string): Promise<Config> {
112
111
headers : util . isPlainObject ( server . headers ) ? toStringMap ( server . headers ) : { } ,
113
112
rewrites : util . isPlainObject ( server . rewrites ) ? toStringMap ( server . rewrites ) : { } ,
114
113
middlewares : Array . isArray ( server . middlewares ) ? server . middlewares . filter ( v => typeof v === 'function' ) : [ ] ,
115
- compress : typeof server . compress === 'boolean ' ? server . compress : true
114
+ compress : typeof server . compress === 'undefined ' ? true : Boolean ( server . compress )
116
115
}
117
116
}
118
117
if ( util . isPlainObject ( css ) ) {
119
118
const { cache, modules, postcss } = css
120
119
config . css = {
121
- cache : Boolean ( cache ) ,
120
+ cache : typeof cache === 'undefined' ? true : Boolean ( cache ) ,
122
121
modules : util . isPlainObject ( modules ) ? modules : { } ,
123
122
postcss : isPostcssConfig ( postcss ) ? postcss : { plugins : [ 'autoprefixer' ] }
124
123
}
@@ -238,7 +237,7 @@ function toStringMap(v: any): Record<string, string> {
238
237
const imports : Record < string , string > = { }
239
238
if ( util . isPlainObject ( v ) ) {
240
239
Object . entries ( v ) . forEach ( ( [ key , value ] ) => {
241
- if ( key == '' ) {
240
+ if ( key === '' ) {
242
241
return
243
242
}
244
243
if ( util . isFilledString ( value ) ) {
0 commit comments