Figma
클론 코딩을 진행하던 중, NextJS
SSR 덕분에 모듈 해석 과정에서 parse failed
오류가 뜸
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (
config,
{ buildId, dev, isServer, defaultLoaders, nextRuntime, webpack }
) => {
config.externals.push({ canvas: "commonjs canvas" });
return config;
},
};
export default nextConfig;
next.coonfig.mjs
의 설정 중 webpack 부분을 다음과 같이 변경하였음