Skip to content

Commit da9a3ab

Browse files
authored
Merge branch 'develop' into fix/#23/Stlye-error
2 parents 2dfdc41 + 18cce38 commit da9a3ab

26 files changed

+1472
-11
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Next.js CI/CD with Vercel
33
on:
44
push:
55
branches: [develop, main]
6+
pull_request:
7+
branches: [develop, main]
68

79
jobs:
810
build-and-deploy:

next.config.ts

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,36 @@
1-
import type { NextConfig } from "next";
1+
import path from 'path';
2+
import type { NextConfig } from 'next';
3+
4+
const ICON_DIR = path.resolve(__dirname, 'src/shared/icons/source');
25

36
const nextConfig: NextConfig = {
4-
/* config options here */
57
reactStrictMode: true,
8+
webpack: (config) => {
9+
const svgRule = config.module.rules.find(
10+
// @ts-ignore
11+
(rule) => rule.test && rule.test.test && rule.test.test('.svg'),
12+
);
13+
if (svgRule) {
14+
// @ts-ignore
15+
svgRule.exclude = [...(svgRule.exclude || []), ICON_DIR];
16+
}
17+
18+
config.module.rules.push({
19+
test: /\.svg$/,
20+
include: [ICON_DIR],
21+
use: [
22+
{
23+
loader: require.resolve('svg-sprite-loader'),
24+
options: {
25+
symbolId: 'icon-[name]',
26+
extract: false,
27+
},
28+
},
29+
],
30+
});
31+
32+
return config;
33+
},
634
};
735

836
export default nextConfig;

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,19 @@
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "eslint"
9+
"lint": "eslint",
10+
"icons:clean": "svgo -r -f src/shared/icons/source --config=./svgo.config.mjs --multipass",
11+
"icons:gen": "pnpm dlx tsx src/shared/icons/scripts/generate-icon-list.ts ",
12+
"icons": "pnpm icons:clean && pnpm icons:gen"
1013
},
1114
"dependencies": {
1215
"axios": "^1.12.2",
16+
"clsx": "^2.1.1",
1317
"next": "15.5.4",
1418
"react": "19.1.0",
1519
"react-dom": "19.1.0",
16-
"react-hook-form": "^7.64.0"
20+
"react-hook-form": "^7.64.0",
21+
"svgo": "^4.0.0"
1722
},
1823
"devDependencies": {
1924
"@eslint/eslintrc": "^3",
@@ -25,6 +30,7 @@
2530
"eslint": "^9",
2631
"eslint-config-next": "15.5.4",
2732
"postcss": "^8.5.6",
33+
"svg-sprite-loader": "^6.0.11",
2834
"tailwindcss": "4.1.14",
2935
"typescript": "^5"
3036
}

0 commit comments

Comments
 (0)