This repository was archived by the owner on Jul 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ export class Routing {
61
61
62
62
config ( options : RoutingOptions ) {
63
63
Object . keys ( options ) . forEach ( ( key ) => {
64
- Object . assign ( this , { [ '_' + key ] : options [ key as keyof typeof options ] } )
64
+ if ( '_' + key in this ) {
65
+ Object . assign ( this , { [ '_' + key ] : options [ key as keyof typeof options ] } )
66
+ }
65
67
} )
66
68
}
67
69
Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ import { defaultReactVersion } from '../shared/constants.ts'
4
4
import { existsFileSync , existsDirSync } from '../shared/fs.ts'
5
5
import log from '../shared/log.ts'
6
6
import util from '../shared/util.ts'
7
- import type { Config , PostCSSPlugin , CSSOptions } from '../types.ts'
7
+ import type { Config , CSSOptions , PostCSSPlugin } from '../types.ts'
8
8
import { getAlephPkgUri , reLocaleID } from './helper.ts'
9
9
10
10
export interface RequiredConfig extends Required < Omit < Config , 'css' > > {
11
11
react : ReactResolve ,
12
- css : CSSOptions
12
+ css : Required < CSSOptions >
13
13
}
14
14
15
15
export const defaultConfig : Readonly < RequiredConfig > = {
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export type Config = {
73
73
/** `plugins` specifies some plugins for the appliaction. */
74
74
plugins ?: ( LoaderPlugin | ServerPlugin ) [ ]
75
75
/** `css` specifies the css processing options. */
76
- css ?: Partial < CSSOptions >
76
+ css ?: CSSOptions
77
77
/** `headers` appends custom headers for server requests. */
78
78
headers ?: Record < string , string >
79
79
/** `rewrites` specifies the server rewrite map. */
@@ -87,9 +87,9 @@ export type Config = {
87
87
*/
88
88
export type CSSOptions = {
89
89
/** `module` enables the css module feature. */
90
- modules : false | CSSModulesOptions
90
+ modules ? : false | CSSModulesOptions
91
91
/** `postcss` specifies the postcss plugins. */
92
- postcss : { plugins : PostCSSPlugin [ ] }
92
+ postcss ? : { plugins : PostCSSPlugin [ ] }
93
93
}
94
94
95
95
/**
You can’t perform that action at this time.
0 commit comments