File tree 3 files changed +18
-29
lines changed
packages/runtime-core/src
3 files changed +18
-29
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,6 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
124
124
}
125
125
return publicGetter ( target )
126
126
} else if (
127
- __BUNDLER__ &&
128
127
( cssModule = type . __cssModules ) &&
129
128
( cssModule = cssModule [ key ] )
130
129
) {
Original file line number Diff line number Diff line change @@ -8,28 +8,20 @@ export let currentScopeId: string | null = null
8
8
const scopeIdStack : string [ ] = [ ]
9
9
10
10
export function pushScopeId ( id : string ) {
11
- if ( __BUNDLER__ ) {
12
- scopeIdStack . push ( ( currentScopeId = id ) )
13
- }
11
+ scopeIdStack . push ( ( currentScopeId = id ) )
14
12
}
15
13
16
14
export function popScopeId ( ) {
17
- if ( __BUNDLER__ ) {
18
- scopeIdStack . pop ( )
19
- currentScopeId = scopeIdStack [ scopeIdStack . length - 1 ] || null
20
- }
15
+ scopeIdStack . pop ( )
16
+ currentScopeId = scopeIdStack [ scopeIdStack . length - 1 ] || null
21
17
}
22
18
23
19
export function withScopeId ( id : string ) : < T extends Function > ( fn : T ) => T {
24
- if ( __BUNDLER__ ) {
25
- return ( ( fn : Function ) =>
26
- withCtx ( function ( this : any ) {
27
- pushScopeId ( id )
28
- const res = fn . apply ( this , arguments )
29
- popScopeId ( )
30
- return res
31
- } ) ) as any
32
- } else {
33
- return undefined as any
34
- }
20
+ return ( ( fn : Function ) =>
21
+ withCtx ( function ( this : any ) {
22
+ pushScopeId ( id )
23
+ const res = fn . apply ( this , arguments )
24
+ popScopeId ( )
25
+ return res
26
+ } ) ) as any
35
27
}
Original file line number Diff line number Diff line change @@ -563,16 +563,14 @@ function baseCreateRenderer(
563
563
}
564
564
565
565
// scopeId
566
- if ( __BUNDLER__ ) {
567
- if ( scopeId ) {
568
- hostSetScopeId ( el , scopeId )
569
- }
570
- const treeOwnerId = parentComponent && parentComponent . type . __scopeId
571
- // vnode's own scopeId and the current patched component's scopeId is
572
- // different - this is a slot content node.
573
- if ( treeOwnerId && treeOwnerId !== scopeId ) {
574
- hostSetScopeId ( el , treeOwnerId + '-s' )
575
- }
566
+ if ( scopeId ) {
567
+ hostSetScopeId ( el , scopeId )
568
+ }
569
+ const treeOwnerId = parentComponent && parentComponent . type . __scopeId
570
+ // vnode's own scopeId and the current patched component's scopeId is
571
+ // different - this is a slot content node.
572
+ if ( treeOwnerId && treeOwnerId !== scopeId ) {
573
+ hostSetScopeId ( el , treeOwnerId + '-s' )
576
574
}
577
575
578
576
// children
You can’t perform that action at this time.
0 commit comments