Skip to content

Commit 56353dd

Browse files
committed
테스트로 mdx 문서 생성
1 parent 1b748c0 commit 56353dd

File tree

11 files changed

+24
-26
lines changed

11 files changed

+24
-26
lines changed

next.config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
2020
enabled: process.env.ANALYZE === "true",
2121
});
2222

23-
const withMDX = require("@next/mdx")();
23+
const withMDX = require("@next/mdx")({
24+
extension: /\.mdx?$/,
25+
});
2426

2527
module.exports = withMDX(withBundleAnalyzer(config));

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"@next/mdx": "^13.4.4",
3333
"@supabase/supabase-js": "2.23.0",
3434
"@tailwindcss/forms": "^0.5.3",
35-
"@types/mdx": "^2.0.5",
3635
"@upstash/qstash": "^0.3.6",
3736
"axios": "^1.4.0",
3837
"date-fns": "^2.30.0",
@@ -75,6 +74,7 @@
7574
"@types/is-url": "^1.2.30",
7675
"@types/markdown-it": "^12.2.3",
7776
"@types/react": "^18.2.7",
77+
"@types/mdx": "^2.0.5",
7878
"autoprefixer": "^10.4.14",
7979
"commitlint": "^17.6.3",
8080
"concurrently": "^8.0.1",

pnpm-lock.yaml

+3-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/hello/doc.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Hello, Next.js!
2+
3+
You can import and use React components in MDX files.

src/app/hello/page.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import HelloWorld from "./doc.mdx";
2+
3+
export default function Page() {
4+
return <HelloWorld />;
5+
}

src/mdx-components.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { MDXComponents } from "mdx/types";
66
// other libraries.
77

88
// This file is required to use MDX in `app` directory.
9+
// eslint-disable-next-line import/prefer-default-export
910
export function useMDXComponents(components: MDXComponents): MDXComponents {
1011
return {
1112
// Allows customizing built-in components, e.g. to add styling.

src/modules/content/code-block/__snapshots__/convert.test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Vitest Snapshot v1
1+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`convert > getElement > \\n이 여러 개 있을 때 1`] = `
44
{

src/modules/import/wordpress/__snapshots__/parse.test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Vitest Snapshot v1
1+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`getPublishedPost > 제대로 동작해야 함 1`] = `
44
[

src/modules/parse/__snapshots__/html-to-slate-node.test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Vitest Snapshot v1
1+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`htmlToSlateFragment > Wordpress Content > 실제 워드프레스 포스팅을 잘 변환해야 함: 35 1`] = `
44
[

tsconfig.json

+4-17
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
{
22
"compilerOptions": {
33
"target": "es2018",
4-
"lib": [
5-
"es2018",
6-
"esnext.asynciterable",
7-
"DOM"
8-
],
4+
"lib": ["es2018", "esnext.asynciterable", "DOM"],
95
"allowJs": true,
106
"skipLibCheck": true,
117
"strict": true,
@@ -20,16 +16,9 @@
2016
"jsx": "preserve",
2117
"baseUrl": "src",
2218
"incremental": true,
23-
"types": [
24-
"vitest/globals"
25-
],
2619
"paths": {
27-
"@common/*": [
28-
"common/*"
29-
],
30-
"@modules/*": [
31-
"modules/*"
32-
]
20+
"@common/*": ["common/*"],
21+
"@modules/*": ["modules/*"]
3322
},
3423
"plugins": [
3524
{
@@ -45,7 +34,5 @@
4534
"commitlint.config.js",
4635
".next/types/**/*.ts"
4736
],
48-
"exclude": [
49-
"node_modules"
50-
]
37+
"exclude": ["node_modules"]
5138
}

vitest-env.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vitest/globals" />

0 commit comments

Comments
 (0)