codecamp

MorJS jsMinimizer - JS 压缩器

  • 类型: ​string​ 或 ​boolean
  • 默认值: ​null
  • 可选值:
  1. ters
  2. eresbuild
  3. swc
  4. true​ 或 ​false

开关或指定 js 代码压缩器。

默认值为 ​null​ 时会基于 ​compilerOptions.target​ 的值来自动选择压缩器:

  • 当 ​compilerOptions.target​ 的值是 ​ES5​ 时,​jsMinimizer​ 为 ​terser
  • 当 ​compilerOptions.target​ 的值不是 ​ES5​ 时,​jsMinimizer​ 为 ​esbuild

如果用户配置了 jsMinimizer 则以用户配置的为准。


MorJS ignore - 忽略配置
MorJS jsMinimizerOptions - JS 压缩选项
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

MorJS 指南

MorJS 基础用法

MorJS 配置

MorJS 编译相关配置

MorJS 进阶用法

MorJS Web开发

MorJS Web开发介绍

MorJS Web开发快速上手

MorJS Tabbar IOS 小黑条适配开关

MorJS 社区

MorJS 规范

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }