Skip to content

Commit 76e10b5

Browse files
committed
Merge branch 'sync-docs' of https://github.com/vitejs/docs-cn into sync-b05e307e-1
2 parents 602e821 + b05e307 commit 76e10b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guide/api-plugin.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export default function myPlugin() {
113113

114114
```js
115115
export default function myPlugin() {
116-
const virtualModuleId = '@my-virtual-module'
116+
const virtualModuleId = 'virtual:my-module'
117117
const resolvedVirtualModuleId = '\0' + virtualModuleId
118118

119119
return {
@@ -135,7 +135,7 @@ export default function myPlugin() {
135135
这使得可以在 JavaScript 中引入这些模块:
136136

137137
```js
138-
import { msg } from '@my-virtual-module'
138+
import { msg } from 'virtual:my-module'
139139

140140
console.log(msg)
141141
```

0 commit comments

Comments
 (0)