Commit 4aa4a80 1 parent 8880bc5 commit 4aa4a80 Copy full SHA for 4aa4a80
File tree 4 files changed +640
-558
lines changed
4 files changed +640
-558
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ import {
69
69
} from '../utils'
70
70
import type { Logger } from '../logger'
71
71
import { cleanUrl , slash } from '../../shared/utils'
72
+ import type { TransformPluginContext } from '../server/pluginContainer'
72
73
import { addToHTMLProxyTransformResult } from './html'
73
74
import {
74
75
assetUrlRE ,
@@ -969,9 +970,8 @@ export function cssAnalysisPlugin(config: ResolvedConfig): Plugin {
969
970
! inlineRE . test ( id ) &&
970
971
! htmlProxyRE . test ( id )
971
972
// attached by pluginContainer.addWatchFile
972
- const pluginImports = ( this as any ) . _addedImports as
973
- | Set < string >
974
- | undefined
973
+ const pluginImports = ( this as unknown as TransformPluginContext )
974
+ . _addedImports
975
975
if ( pluginImports ) {
976
976
// record deps in the module graph so edits to @import css can trigger
977
977
// main import to hot update
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ import {
63
63
withTrailingSlash ,
64
64
wrapId ,
65
65
} from '../../shared/utils'
66
+ import type { TransformPluginContext } from '../server/pluginContainer'
66
67
import { throwOutdatedRequest } from './optimizedDeps'
67
68
import { isCSSRequest , isDirectCSSRequest } from './css'
68
69
import { browserExternalId } from './resolve'
@@ -253,7 +254,10 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
253
254
throwOutdatedRequest ( importer )
254
255
}
255
256
256
- if ( ! imports . length && ! ( this as any ) . _addedImports ) {
257
+ if (
258
+ ! imports . length &&
259
+ ! ( this as unknown as TransformPluginContext ) . _addedImports
260
+ ) {
257
261
importerModule . isSelfAccepting = false
258
262
debug ?.(
259
263
`${ timeFrom ( msAtStart ) } ${ colors . dim (
@@ -747,9 +751,8 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
747
751
// note that we want to handle .css?raw and .css?url here
748
752
if ( ! isCSSRequest ( importer ) || SPECIAL_QUERY_RE . test ( importer ) ) {
749
753
// attached by pluginContainer.addWatchFile
750
- const pluginImports = ( this as any ) . _addedImports as
751
- | Set < string >
752
- | undefined
754
+ const pluginImports = ( this as unknown as TransformPluginContext )
755
+ . _addedImports
753
756
if ( pluginImports ) {
754
757
; (
755
758
await Promise . all (
You can’t perform that action at this time.
0 commit comments