Skip to content

Commit 22c4e2b

Browse files
committed
feat: init project
1 parent 58d59b4 commit 22c4e2b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+9692
-173
lines changed

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,5 @@ yarn-error.log*
3939
# typescript
4040
*.tsbuildinfo
4141
next-env.d.ts
42+
43+
.idea

Diff for: next.config.ts

+36-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,41 @@
1+
import nextra from "nextra";
12
import type { NextConfig } from "next";
3+
import i18nConfig from "./src/config/i18n";
4+
5+
const withNextra = nextra({
6+
defaultShowCopyCode: true,
7+
latex: true,
8+
contentDirBasePath: "/",
9+
});
210

311
const nextConfig: NextConfig = {
4-
/* config options here */
12+
reactStrictMode: true,
13+
eslint: {
14+
// Warning: This allows production builds to successfully complete even if
15+
// your project has ESLint errors.
16+
ignoreDuringBuilds: true,
17+
},
18+
i18n: {
19+
locales: i18nConfig.map((x) => x.locale),
20+
defaultLocale: i18nConfig[0].locale,
21+
},
22+
webpack(config) {
23+
// rule.exclude doesn't work starting from Next.js 15
24+
const { test: _test, ...imageLoaderOptions } = config.module.rules.find(
25+
(rule: any) => rule.test?.test?.(".svg"),
26+
);
27+
config.module.rules.push({
28+
test: /\.svg$/,
29+
oneOf: [
30+
{
31+
resourceQuery: /svgr/,
32+
use: ["@svgr/webpack"],
33+
},
34+
imageLoaderOptions,
35+
],
36+
});
37+
return config;
38+
},
539
};
640

7-
export default nextConfig;
41+
export default withNextra(nextConfig);

Diff for: package.json

+13-6
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,29 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"dev": "next dev",
6+
"dev": "next",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "next lint"
9+
"lint": "next lint",
10+
"prettier": "prettier -w ."
1011
},
1112
"dependencies": {
13+
"@svgr/webpack": "^8.1.0",
14+
"@tailwindcss/postcss": "0.0.0-development.1",
15+
"next": "15.1.4",
16+
"nextra": "^4.0.0",
17+
"nextra-theme-docs": "^4.0.0",
1218
"react": "^19.0.0",
13-
"react-dom": "^19.0.0",
14-
"next": "15.1.4"
19+
"react-dom": "^19.0.0"
1520
},
1621
"devDependencies": {
17-
"typescript": "^5",
1822
"@types/node": "^20",
1923
"@types/react": "^19",
2024
"@types/react-dom": "^19",
25+
"@types/tailwindcss": "^3.1.0",
2126
"postcss": "^8",
22-
"tailwindcss": "^3.4.1"
27+
"prettier": "^3.4.2",
28+
"tailwindcss": "^3.4.17",
29+
"typescript": "^5"
2330
}
2431
}

0 commit comments

Comments
 (0)