File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import {
20
20
} from './runtime/webpack'
21
21
import type { TMatchVariable } from './parser'
22
22
import type { IVueCSSVarsCtx , Options } from './types'
23
-
23
+ import type { Compiler } from 'webpack'
24
24
const unplugin = createUnplugin < Options > (
25
25
( options : Options = { } , meta ) : any => {
26
26
const userOptions = initOption ( options )
@@ -88,7 +88,7 @@ const unplugin = createUnplugin<Options>(
88
88
// handle hmr with vite
89
89
vite : vitePlugin ( context ) ,
90
90
// handle hmr with webpack
91
- webpack ( compiler ) {
91
+ webpack ( compiler : Compiler ) {
92
92
webpackPlugin ( context , compiler )
93
93
} ,
94
94
} ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { handleVBindVariable } from './handle-variable'
5
5
import { handleInjectCss } from './handle-inject-css'
6
6
import type { IVueCSSVarsCtx } from '../types'
7
7
import type { MagicStringBase } from 'magic-string-ast'
8
-
8
+ import type { Compiler } from 'webpack'
9
9
// TODO: unit test
10
10
export function transformPreWebpack (
11
11
id : string ,
@@ -48,7 +48,7 @@ export function transformPostWebpack(
48
48
}
49
49
50
50
// TODO: unit test
51
- export const webpackPlugin = ( ctx : IVueCSSVarsCtx , compiler : any ) => {
51
+ export const webpackPlugin = ( ctx : IVueCSSVarsCtx , compiler : Compiler ) => {
52
52
// mark webpack hmr
53
53
let modifiedFile = ''
54
54
compiler . hooks . watchRun . tapAsync ( NAME , ( compilation1 , watchRunCallBack ) => {
You can’t perform that action at this time.
0 commit comments