Skip to content

Commit 0477ccd

Browse files
authored
Feat: next-plugin-svgr 설정 (#60)
1 parent 31fb291 commit 0477ccd

File tree

6 files changed

+390
-16
lines changed

6 files changed

+390
-16
lines changed

.github/workflows/auto-assign-issue.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

next.config.ts

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
1-
import type { NextConfig } from "next";
21
import { createVanillaExtractPlugin } from "@vanilla-extract/next-plugin";
2+
import type { NextConfig } from "next";
3+
import withSvgr from "next-plugin-svgr";
4+
5+
// Vanilla Extract 플러그인
6+
const withVanillaExtract = (config: NextConfig): NextConfig =>
7+
createVanillaExtractPlugin()(config);
38

4-
const withVanillaExtract = createVanillaExtractPlugin();
9+
// Svgr 플러그인
10+
const withCustomSvgr = (config: NextConfig): NextConfig =>
11+
withSvgr({
12+
...config,
13+
svgrOptions: {
14+
dimensions: false,
15+
icon: true,
16+
},
17+
});
518

6-
const nextConfig: NextConfig = {
7-
/* config options here */
19+
const plugins = [withVanillaExtract, withCustomSvgr];
20+
21+
const baseConfig: NextConfig = {
22+
reactStrictMode: true,
823
};
924

10-
export default withVanillaExtract(nextConfig);
25+
const finalConfig = plugins.reduce((acc, plugin) => plugin(acc), baseConfig);
26+
27+
export default finalConfig;

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"clsx": "^2.1.1",
2525
"ky": "^1.8.1",
2626
"next": "15.3.5",
27+
"next-plugin-svgr": "^1.1.12",
2728
"pretendard": "^1.3.9",
2829
"react": "^19.0.0",
2930
"react-dom": "^19.0.0"

0 commit comments

Comments
 (0)