Skip to content

Commit bc6a277

Browse files
committed
๐Ÿ› ์ƒˆ๋กœ๊ณ ์นจ ์‹œ 404ํŽ˜์ด์ง€ ๋…ธ์ถœ ์ด์Šˆ
1 parent 5d7b1ef commit bc6a277

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

โ€Žnext.config.tsโ€Ž

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import type { NextConfig } from 'next';
22

33
const nextConfig: NextConfig = {
4-
/* config options here */
54
reactStrictMode: false,
6-
webpack(config) {
5+
output: 'export',
6+
webpack(config, { isServer }) {
7+
// SVG ๋กœ๋” ์ถ”๊ฐ€
78
config.module.rules.push({
89
test: /\.svg$/, // SVG ํŒŒ์ผ์„ ์ฐพ์Šต๋‹ˆ๋‹ค.
910
use: [
@@ -16,6 +17,19 @@ const nextConfig: NextConfig = {
1617
],
1718
});
1819

20+
// publicPath ์„ค์ •
21+
config.output.publicPath = '/';
22+
23+
// devServer ์„ค์ • ์ถ”๊ฐ€ (ํด๋ผ์ด์–ธํŠธ ์ „์šฉ)
24+
if (!isServer) {
25+
config.devServer = {
26+
...config.devServer,
27+
devMiddleware: {
28+
publicPath: '/',
29+
},
30+
};
31+
}
32+
1933
return config;
2034
},
2135
images: {

0 commit comments

Comments
ย (0)