Skip to content

Commit ef9b937

Browse files
authored
docs: add missing import in alias config example (#32648)
1 parent d112f3b commit ef9b937

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/3.api/6.nuxt-config.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ your alias by prefixing it with `~`.
3737

3838
**Example**:
3939
```js
40-
export default {
40+
import { fileURLToPath } from "node:url";
41+
42+
export default defineNuxtConfig({
4143
alias: {
4244
'images': fileURLToPath(new URL('./assets/images', import.meta.url)),
4345
'style': fileURLToPath(new URL('./assets/style', import.meta.url)),
4446
'data': fileURLToPath(new URL('./assets/other/data', import.meta.url))
4547
}
46-
}
48+
})
4749
```
4850
4951
```html

0 commit comments

Comments
 (0)