diff --git a/config/prod.ts b/config/prod.ts index 4fa33e2..7fd7f3a 100644 --- a/config/prod.ts +++ b/config/prod.ts @@ -1,6 +1,26 @@ import type { UserConfigExport } from "@tarojs/cli"; export default { - mini: {}, + mini: { + webpackChain: (chain, webpack) => { + chain.merge({ + plugin: { + install: { + plugin: require('terser-webpack-plugin'), + args: [ + { + terserOptions: { + compress: true, // 默认使用terser压缩 + // mangle: false, + keep_classnames: true, // 不改变class名称 + keep_fnames: true, // 不改变函数名称 + }, + }, + ], + }, + }, + }) + } + }, h5: { /** * WebpackChain 插件配置 diff --git a/src/app.scss b/src/app.scss index 3228f0b..0bd3f2f 100644 --- a/src/app.scss +++ b/src/app.scss @@ -1,4 +1,4 @@ -@font-face { - font-family: 'PoetsenOne'; - src: url('./static/asserts/fonts/PoetsenOne-Regular.ttf') format('truetype'); -} \ No newline at end of file +// @font-face { +// font-family: 'PoetsenOne'; +// src: url('./static/asserts/fonts/PoetsenOne-Regular.ttf') format('truetype'); +// } \ No newline at end of file