当前位置:网站首页>And console Log say goodbye
And console Log say goodbye
2022-06-25 12:58:00 【Ziwei front end】
Since last month , I've been using Next.js Start a project , And it is used in many components and files console.log sentence , Although I don't remember . Usually , We use it to check API Responses and other areas of the application .
Exposing console statements is not a good idea at all , It may pose a security risk to your application . Checking each file and deleting statements is also time consuming And boring . As a developer , We all hate boring tasks , therefore , In this paper , We'll discuss how to get there in less than 1 minute From the production environment Next.js Say goodbye in the application console.log .
That sounds good ! Let us goooo...
please Follow the steps below -
1. install babel-plugin-transform-remove-console Package as a development dependency .
2. Create a... In your project root directory .babelrc file , Just copy the following .
{
"presets": [
"next/babel"
],
"env": {
"production": {
"plugins": [
"transform-remove-console"
]
}
}
} This is just a little trick I use to improve my productivity , Even if you should use it next time .
I will continue to share more with Web Tips and techniques for development , Coming soon !
边栏推荐
猜你喜欢

@Scheduled implementation of scheduled tasks (concurrent execution of multiple scheduled tasks)

2021-09-22

剑指Offer 第 2 天链表(简单)

更新pip&下载jupyter lab

Embedded software development written examination and interview notes (latest update: February 17, 2022)

画图常用配色

剑指 Offer II 032. 有效的变位词

架构师需要具备的能力

Idea2017 how to set not to automatically open a project at startup

又是被Visdom搞崩溃的一夜
随机推荐
Negative sample image used in yolov5 training
Geospatial search - > R tree index
Methods of strings in JS charat(), charcodeat(), fromcharcode(), concat(), indexof(), split(), slice(), substring()
The amount is verified, and two zeros are spliced by integers during echo
2021-09-28
1251- Client does not support authentication protocol MySql错误解决方案
始终保持疫情防控不放松 营造安全稳定的社会环境
yolov5训练使用的负样本图片
Wechat full-text search technology optimization
为何数据库也云原生了?
STM32 stores float data in flash
Elemtnui select control combined with tree control to realize user-defined search method
MySQL 学习笔记
Koa frame
Baidu search stability analysis story
flutter 收到推送后自动消失问题
2021-09-30
20220620 面试复盘
Resolved: could not find artifact XXX
Embedded software development written examination and interview notes (latest update: February 17, 2022)