Skip to content

Commit

Permalink
docs: improve virtual module examples (#7636)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Apr 7, 2022
1 parent 4433df4 commit c02537b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/guide/api-plugin.md
Expand Up @@ -113,7 +113,7 @@ Virtual modules are a useful scheme that allows you to pass build time informati

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

return {
Expand All @@ -135,7 +135,7 @@ export default function myPlugin() {
Which allows importing the module in JavaScript:

```js
import { msg } from '@my-virtual-module'
import { msg } from 'virtual:my-module'

console.log(msg)
```
Expand Down

0 comments on commit c02537b

Please sign in to comment.