250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
Tags
- ResizeObserver
- 구름톤 챌린지
- 구름톤
- 호텔 대실
- nextjs-performance
- Hermes Engine
- 연결 요소 제거하기
- 과제 진행하기
- 구름톤챌린지
- mutationobserver
- Google 애널리틱스
- create-next-app
- 자바스크립트
- 귤 고르기
- 날짜 테스트
- 리액트네이티브 엔진
- 리액트네이티브
- 테이블 해시 함수
- 중첩 점
- jest
- 헤르메스 엔진
- 테스트 Date
- Jest uuid syntax
- JavaScript
- nextjs
- mock date
- 프로그래머스
- Leetcode #javascript #알고리즘 #Algorithms #js
- 통신망분석
- 최솟갑 구하기
Archives
- Today
- Total
나만보는개발공부블로그
[NextJS] nextjs Error: Plugin name should be specified 본문
Web Development/Front
[NextJS] nextjs Error: Plugin name should be specified
alexrider94 2022. 6. 7. 22:11SVG 파일을 responsive하게 size를 변경할려다가 svg의 viewBox가 있어야한다는걸 인지하게 되었고 @svgr/webpack에서 options 설정을 따로 해주지 않을경우 viewBox가 표시되지않는걸 확인하였다.
그래서 다음과 같이 설정하였는데
module.exports = {
webpack(conf) {
conf.module.rules.push({
test: /\.svg$/,
use: [
{
loader: "@svgr/webpack",
options: {
svgoConfig: {
plugins: [
{
removeViewBox: false,
},
],
},
},
},
],
});
conf.resolve.modules.push(__dirname);
return conf;
},
};
제목과 같은 에러가 발생하였다.
nextjs Error: Plugin name should be specified
구글링 결과 해결 방법은
plugins안에서
...
plugins: [
{
name: "removeViewBox",
active: false,
},
],
위의 방식 처럼 변경 해주면 된다.
'Web Development > Front' 카테고리의 다른 글
[Cypress] window.__coverage__ is undefined (0) | 2022.06.24 |
---|---|
[NextJS] SEO for SVG image file (0) | 2022.06.07 |
[NextJS] create-react-app migration to NextJS (0) | 2022.06.07 |
Storybook 적용 (0) | 2022.04.27 |
[React]ref 와 forwardRef (0) | 2021.12.15 |