Unverified Commit 642e93c6 authored by Eng Zer Jun's avatar Eng Zer Jun Committed by GitHub

docs: update code block filename in Module Aliases section (#66825)

The filenames of the last two code blocks on this page
https://nextjs.org/docs/app/building-your-application/configuring/absolute-imports-and-module-aliases#module-aliases
are written as comment instead of using the `filename` prop.


![image](https://github.com/vercel/next.js/assets/20135478/6186ea56-6ea8-4fe9-ba29-e8036aee5f9d)
Signed-off-by: 's avatarEng Zer Jun <engzerjun@gmail.com>
Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent 61897f2c
...@@ -135,8 +135,7 @@ export default function HomePage() { ...@@ -135,8 +135,7 @@ export default function HomePage() {
Each of the `"paths"` are relative to the `baseUrl` location. For example: Each of the `"paths"` are relative to the `baseUrl` location. For example:
```json ```json filename="tsconfig.json or jsconfig.json"
// tsconfig.json or jsconfig.json
{ {
"compilerOptions": { "compilerOptions": {
"baseUrl": "src/", "baseUrl": "src/",
...@@ -148,8 +147,22 @@ Each of the `"paths"` are relative to the `baseUrl` location. For example: ...@@ -148,8 +147,22 @@ Each of the `"paths"` are relative to the `baseUrl` location. For example:
} }
``` ```
```jsx ```tsx filename="app/page.tsx" switcher
// pages/index.js import Button from '@/components/button'
import '@/styles/styles.css'
import Helper from 'utils/helper'
export default function HomePage() {
return (
<Helper>
<h1>Hello World</h1>
<Button />
</Helper>
)
}
```
```jsx filename="app/page.js" switcher
import Button from '@/components/button' import Button from '@/components/button'
import '@/styles/styles.css' import '@/styles/styles.css'
import Helper from 'utils/helper' import Helper from 'utils/helper'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment