Skip to content

Commit 6fa96d8

Browse files
committed
fix: transformPluginContext should match the current plugin's context
1 parent 6fe2de8 commit 6fa96d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ const unplugin = createUnplugin<Options>(options => ({
6464
isBuild = config.command === 'build'
6565
},
6666
transform() {
67-
transformPluginContext = this
67+
if ((this as any)._activeId === MODULE_NAME)
68+
transformPluginContext = this
6869
},
6970
configureServer(server) {
7071
viteDevServer = server

0 commit comments

Comments
 (0)