콘솔 경고 개선: React 프로덕션 전환, 자동완성 속성 추가 및 불필요한 라이브러리 경고 필터링 적용
This commit is contained in:
@@ -14,6 +14,30 @@
|
||||
<!-- Fonts: Pretendard -->
|
||||
<link rel="stylesheet" as="style" crossorigin href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/static/pretendard.css" />
|
||||
|
||||
<!-- Console Warning Filter -->
|
||||
<script>
|
||||
(function() {
|
||||
const originalWarn = console.warn;
|
||||
const originalLog = console.log;
|
||||
const suppressPatterns = [
|
||||
'cdn.tailwindcss.com should not be used in production',
|
||||
'You are using the in-browser Babel transformer',
|
||||
'Download the React DevTools'
|
||||
];
|
||||
|
||||
const filter = (orig) => function() {
|
||||
const msg = arguments[0];
|
||||
if (typeof msg === 'string' && suppressPatterns.some(p => msg.includes(p))) {
|
||||
return;
|
||||
}
|
||||
orig.apply(console, arguments);
|
||||
};
|
||||
|
||||
console.warn = filter(originalWarn);
|
||||
console.log = filter(originalLog);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- Tailwind CSS -->
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script>
|
||||
@@ -38,9 +62,9 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- React & ReactDOM -->
|
||||
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
|
||||
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
|
||||
<!-- React & ReactDOM (Production Versions) -->
|
||||
<script crossorigin src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
|
||||
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
|
||||
|
||||
<!-- Babel for JSX -->
|
||||
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
|
||||
@@ -1497,6 +1521,7 @@
|
||||
<input
|
||||
type="text"
|
||||
required
|
||||
autoComplete="username"
|
||||
value={memberId}
|
||||
onChange={(e) => setMemberId(e.target.value)}
|
||||
className="w-full px-4 py-3 bg-slate-50 border border-slate-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:bg-white outline-none transition-all font-medium"
|
||||
|
||||
Reference in New Issue
Block a user