File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
packages/vite-plugin-svelte/src Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -100,8 +100,7 @@ async function createCssTransform(style, config) {
100
100
if ( style . __resolvedConfig ) {
101
101
// @ts -expect-error
102
102
resolvedConfig = style . __resolvedConfig ;
103
- } else if ( config . inlineConfig != null ) {
104
- // passed config is already resolved
103
+ } else if ( isResolvedConfig ( config ) ) {
105
104
resolvedConfig = config ;
106
105
} else {
107
106
resolvedConfig = await resolveConfig (
@@ -113,3 +112,11 @@ async function createCssTransform(style, config) {
113
112
return preprocessCSS ( code , filename , resolvedConfig ) ;
114
113
} ;
115
114
}
115
+
116
+ /**
117
+ * @param {any } config
118
+ * @returns {config is import('vite').ResolvedConfig }
119
+ */
120
+ function isResolvedConfig ( config ) {
121
+ return ! ! config . inlineConfig ;
122
+ }
You can’t perform that action at this time.
0 commit comments