반응형
1. 설치
npm i vite-plugin-remove-console
2. vite.config.ts에 추가
export default defineConfig({
plugins: [{
...react(),
...removeConsole({ includes: ["log", "warn", "error", "info", "debug"] }),
apply: 'build'
}],
})
빌드할때만 안나오게 처리하고싶어서 vite를 찾아보니 플러그인에 저렇게 쓰면 된다고 함.
'vite' 카테고리의 다른 글
[vite] 현재 폴더에 프로젝트 생성하기 (0) | 2024.11.08 |
---|---|
[vite]Uncaught ReferenceError: process is not defined (0) | 2024.07.18 |
[vite] font, image 폴더 build할 때 dist로 내보내기 (0) | 2024.06.19 |
[vite] 현재 폴더에 프로젝트 설치하기 (0) | 2024.06.18 |
[vite][최신방법] src경로를 @로 쉽게 쓰는 법 (0) | 2024.02.14 |