当前位置: 首页 > news >正文

nas做流媒体网站网站开发学些什么

nas做流媒体网站,网站开发学些什么,文化墙创意设计图片,比wordpress还好在 Taro 项目中#xff0c;为了减少 console 的显示#xff08;例如 console.log、console.info 等#xff09;#xff0c;可以通过配置 terser-webpack-plugin 来移除生产环境中的 console 调用。 配置步骤#xff1a; 修改 index.js 文件 在 mini.webpackChain 中添加 …在 Taro 项目中为了减少 console 的显示例如 console.log、console.info 等可以通过配置 terser-webpack-plugin 来移除生产环境中的 console 调用。 配置步骤 修改 index.js 文件 在 mini.webpackChain 中添加 terser-webpack-plugin 配置 const config {projectName: taro-react,date: 2025-5-10,designWidth: 750,deviceRatio: {640: 2.34 / 2,750: 1,828: 1.81 / 2},sourceRoot: src,outputRoot: dist,plugins: [],defineConstants: {},copy: {patterns: [],options: {}},framework: react,compiler: webpack5,cache: {enable: false},mini: {webpackChain(chain) {// 生产环境移除 consoleif (process.env.NODE_ENV production) {chain.optimization.minimize(true);chain.plugin(terser).use(require(terser-webpack-plugin), [{terserOptions: {compress: {drop_console: true, // 移除所有 consoledrop_debugger: true // 移除 debugger}}}]);}}},h5: {publicPath: /,staticDirectory: static,postcss: {autoprefixer: {enable: true,config: {}}}} };module.exports function (merge) {if (process.env.NODE_ENV development) {return merge({}, config, require(./dev));}return merge({}, config, require(./prod)); };构建生产环境代码 使用以下命令构建生产环境代码 pnpm build:weapp --mode production 在 Taro 项目中为了减少 console 的显示例如 console.log、console.info 等可以通过配置 terser-webpack-plugin 来移除生产环境中的 console 调用。 配置步骤 修改 index.js 文件 在 mini.webpackChain 中添加 terser-webpack-plugin 配置 const config {projectName: taro-react,date: 2025-5-10,designWidth: 750,deviceRatio: {640: 2.34 / 2,750: 1,828: 1.81 / 2},sourceRoot: src,outputRoot: dist,plugins: [],defineConstants: {},copy: {patterns: [],options: {}},framework: react,compiler: webpack5,cache: {enable: false},mini: {webpackChain(chain) {// 生产环境移除 consoleif (process.env.NODE_ENV production) {chain.optimization.minimize(true);chain.plugin(terser).use(require(terser-webpack-plugin), [{terserOptions: {compress: {drop_console: true, // 移除所有 consoledrop_debugger: true // 移除 debugger}}}]);}}},h5: {publicPath: /,staticDirectory: static,postcss: {autoprefixer: {enable: true,config: {}}}} };module.exports function (merge) {if (process.env.NODE_ENV development) {return merge({}, config, require(./dev));}return merge({}, config, require(./prod)); };构建生产环境代码 使用以下命令构建生产环境代码 pnpm build:weapp --mode production或者如果你使用的是 npm/yarn npm run build:weapp --mode production # 或 yarn build:weapp --mode production效果 生产环境中所有 console.log、console.info、console.debug 等调用都会被移除。console.warn 和 console.error 不会被移除用于调试和错误追踪。debugger 语句也会被移除。 注意事项 确保 terser-webpack-plugin 已安装Taro 默认会安装。 在开发环境中console 调用仍然会保留方便调试。 如果需要移除所有类型的 console可以在 terserOptions.compress 中添加更多配置例如 compress: {drop_console: true,drop_debugger: true,pure_funcs: [console.log, console.info, console.debug, console.warn, console.error] }Similar code found with 2 license types
http://www.pierceye.com/news/918569/

相关文章:

  • idc网站模板 dedewordpress虚拟资源交易平台
  • 微网站在哪建网站首页默认的文件名一般为
  • 网站内容建设招标做芯片代理哪个网站推广
  • 网站模板图册上海机械网站建设
  • 专业的图纸设计网站怎么做外贸网站需注意哪些
  • 网站推广排名收费标准网址地址
  • 做短裙的视频网站网站生成手机版
  • 李洋网站建设睢宁做网站
  • 网站内的搜索怎么做的小程序游戏开发成本
  • 深圳市住建局造价站装潢设计就业前景
  • 网站上的按钮怎么做ipad做网站服务器
  • 马来西亚的网站后缀3d建模平台
  • 昆山建设工程安监站网站jsp网站开发好书
  • 策划书怎么写 范文泉州seo招聘
  • 网站建设的业务好做吗wordpress 首页静态
  • 做网站销售的话术网络广告策划方案
  • 企智网络网站建设公司社交信息共享网站开发外包
  • 网站建设168网站谁做的比较好
  • 邯郸移动网站建设公司wordpress页脚太高
  • 大型电子商务网站开发上海 网站建设 外包it
  • 设计得很好的企业网站wordpress 标签云
  • 杂志网站模板苏州设计网页网站好
  • 设计理论网站清远市发布
  • 长沙本土网站制作公司wordpress thegem
  • 网站后台 源码重庆电力公司网站
  • 泰安企业网站建设电话廉江手机网站建设公司
  • 自已建网站微信登录珠海绿网科技有限公司
  • 大良网站制作太原建筑公司网站
  • 网站开发的交付文档抖音代运营费用明细
  • 自适应网站建设沈阳网站安全建设需求