diff --git a/tools/bin/webpack.config.base.js b/tools/bin/webpack.config.base.js index 8b2e0920..f9a5b0ef 100644 --- a/tools/bin/webpack.config.base.js +++ b/tools/bin/webpack.config.base.js @@ -1,6 +1,6 @@ /** * @module webpack.config.base - * @description 基础 Webpack 配置. + * @description 基础 Webpack 配置 */ import webpack from 'webpack'; diff --git a/tools/bin/webpack.config.dev.js b/tools/bin/webpack.config.dev.js index d22c3388..f04efccb 100644 --- a/tools/bin/webpack.config.dev.js +++ b/tools/bin/webpack.config.dev.js @@ -1,6 +1,6 @@ /** * @module webpack.config.dev - * @description 开发环境 Webpack 配置. + * @description 开发环境 Webpack 配置 * @see https://github.com/facebook/create-react-app */ diff --git a/tools/bin/webpack.config.prod.js b/tools/bin/webpack.config.prod.js index 7b9ced7e..aaf57501 100644 --- a/tools/bin/webpack.config.prod.js +++ b/tools/bin/webpack.config.prod.js @@ -1,6 +1,6 @@ /** * @module webpack.config.prod - * @description 生产环境 Webpack 配置. + * @description 生产环境 Webpack 配置 * @see https://github.com/facebook/create-react-app */ @@ -28,7 +28,7 @@ async function getLightningTargets() { configure.devtool = false; configure.cache.name = 'prod'; - // 使用自定义 minimizer 工具. + // 使用自定义 minimizer 工具 configure.optimization.minimizer = [ new CssMinimizerPlugin({ minimizerOptions: { @@ -42,7 +42,7 @@ async function getLightningTargets() { }) ]; - // 开启 webpack-bundle-analyzer 分析工具. + // 开启 webpack-bundle-analyzer 分析工具 if (process.argv[2] === '--report') { configure.plugins.push(new BundleAnalyzerPlugin({ analyzerPort: 'auto' })); } diff --git a/tools/interface.ts b/tools/interface.ts index 878ecbe5..eb18d690 100644 --- a/tools/interface.ts +++ b/tools/interface.ts @@ -1,6 +1,6 @@ /** * @module interface - * @description 类型定义. + * @description 类型定义 */ import { Configuration } from 'webpack'; @@ -9,19 +9,19 @@ import { Plugin, ProcessOptions } from 'postcss'; import { Options as SvgoOptions } from '@nuintun/svgo-loader'; /** - * @description Env 配置. + * @description Env 配置 */ type Env = Record; /** - * @description Env 配置函数. + * @description Env 配置函数 */ interface EnvFunction { (mode: string, env: Env): Env | Promise; } /** - * @description 获取对象指定属性非空类型. + * @description 获取对象指定属性非空类型 */ type Prop = NonNullable; @@ -31,12 +31,12 @@ type Prop = NonNullable; export { Options as SwcConfig } from '@swc/core'; /** - * @description Webpack 文件系统. + * @description Webpack 文件系统 */ export type FileSystem = NonNullable; /** - * @description Postcss 配置. + * @description Postcss 配置 */ export interface PostcssConfig extends ProcessOptions { plugins?: Plugin[]; @@ -44,14 +44,14 @@ export interface PostcssConfig extends ProcessOptions { } /** - * @description Svgo 配置. + * @description Svgo 配置 */ export interface SvgoConfig extends Omit { path?: string; } /** - * @description App 配置. + * @description App 配置 */ export interface AppConfig extends Pick { lang: string; diff --git a/tools/lib/ip.js b/tools/lib/ip.js index a2469d6e..a9c89054 100644 --- a/tools/lib/ip.js +++ b/tools/lib/ip.js @@ -1,6 +1,6 @@ /** * @module ip - * @description 获取本机 IP 地址. + * @description 获取本机 IP 地址 */ import os from 'node:os'; diff --git a/tools/lib/rules.js b/tools/lib/rules.js index e86578a5..2a24380a 100644 --- a/tools/lib/rules.js +++ b/tools/lib/rules.js @@ -1,6 +1,6 @@ /** * @module rules - * @description 配置 Webpack 规则. + * @description 配置 Webpack 规则 */ import swcrc from '../../.swcrc.js'; diff --git a/tools/lib/targets.js b/tools/lib/targets.js index e6829d04..bfe11d6f 100644 --- a/tools/lib/targets.js +++ b/tools/lib/targets.js @@ -1,6 +1,6 @@ /** * @module targets - * @description 解析 browserslist 配置. + * @description 解析 browserslist 配置 */ import { resolve } from 'node:path';