Procházet zdrojové kódy

revert: "fix: sass-embedded@1.98.0 在 macOS 13 会直接崩 (#7692)"

Jin Mao před 2 měsíci
rodič
revize
bed97a84d8

+ 2 - 2
docs/src/en/guide/project/dir.md

@@ -26,8 +26,8 @@ The repository uses Monorepo management, and the project structure is as follows
 │   ├── node-utils # Node.js tools
 │   ├── tsconfig # Common tsconfig settings
 │   └── vite-config # Common Vite configuration
-├── oxfmt.config.mjs # Oxfmt config entry
-├── oxlint.config.mjs # Oxlint configuration file
+├── oxfmt.config.ts # Oxfmt config entry
+├── oxlint.config.ts # Oxlint configuration file
 ├── package.json # Project dependency configuration
 ├── packages # Project packages directory
 │   ├── @core # Core package

+ 2 - 2
docs/src/en/guide/project/standard.md

@@ -49,7 +49,7 @@ pnpm oxfmt --check
 
 ### Configuration
 
-The root Oxfmt entry file is `oxfmt.config.mjs`, and its core configuration is located in `internal/lint-configs/oxfmt-config`.
+The root Oxfmt entry file is `oxfmt.config.ts`, and its core configuration is located in `internal/lint-configs/oxfmt-config`.
 
 ## Oxlint
 
@@ -64,7 +64,7 @@ pnpm oxlint --fix
 
 ### Configuration
 
-The core Oxlint configuration is located in `internal/lint-configs/oxlint-config`, and the root entry file is `oxlint.config.mjs`.
+The core Oxlint configuration is located in `internal/lint-configs/oxlint-config`, and the root entry file is `oxlint.config.ts`.
 
 ## ESLint
 

+ 2 - 2
docs/src/guide/project/dir.md

@@ -26,8 +26,8 @@
 │   ├── node-utils # Node.js 工具
 │   ├── tsconfig # 通用 tsconfig 配置
 │   └── vite-config # 通用 Vite 配置
-├── oxfmt.config.mjs # Oxfmt 配置入口
-├── oxlint.config.mjs # Oxlint 配置文件
+├── oxfmt.config.ts # Oxfmt 配置入口
+├── oxlint.config.ts # Oxlint 配置文件
 ├── package.json # 项目依赖配置
 ├── packages # 项目包目录
 │   ├── @core # 核心包

+ 2 - 2
docs/src/guide/project/standard.md

@@ -49,7 +49,7 @@ pnpm oxfmt --check
 
 ### 配置
 
-Oxfmt 的根目录入口文件为 `oxfmt.config.mjs`,其核心配置位于 `internal/lint-configs/oxfmt-config` 目录下,可以根据项目需求进行修改。
+Oxfmt 的根目录入口文件为 `oxfmt.config.ts`,其核心配置位于 `internal/lint-configs/oxfmt-config` 目录下,可以根据项目需求进行修改。
 
 ## Oxlint
 
@@ -64,7 +64,7 @@ pnpm oxlint --fix
 
 ### 配置
 
-Oxlint 的核心配置位于 `internal/lint-configs/oxlint-config` 目录下,根目录入口文件为 `oxlint.config.mjs`。
+Oxlint 的核心配置位于 `internal/lint-configs/oxlint-config` 目录下,根目录入口文件为 `oxlint.config.ts`。
 
 ## ESLint
 

+ 24 - 21
internal/vite-config/src/config/application.ts

@@ -1,18 +1,18 @@
-import type { CSSOptions, UserConfig } from "vite";
+import type { CSSOptions, UserConfig } from 'vite';
 
-import type { DefineApplicationOptions } from "../typing";
+import type { DefineApplicationOptions } from '../typing';
 
-import path, { relative } from "node:path";
+import path, { relative } from 'node:path';
 
-import { findMonorepoRoot } from "@vben/node-utils";
+import { findMonorepoRoot } from '@vben/node-utils';
 
-import { NodePackageImporter } from "sass";
-import { defineConfig, loadEnv, mergeConfig } from "vite";
+import { NodePackageImporter } from 'sass-embedded';
+import { defineConfig, loadEnv, mergeConfig } from 'vite';
 
-import { defaultImportmapOptions, getDefaultPwaOptions } from "../options";
-import { loadApplicationPlugins } from "../plugins";
-import { loadAndConvertEnv } from "../utils/env";
-import { getCommonConfig } from "./common";
+import { defaultImportmapOptions, getDefaultPwaOptions } from '../options';
+import { loadApplicationPlugins } from '../plugins';
+import { loadAndConvertEnv } from '../utils/env';
+import { getCommonConfig } from './common';
 
 function defineApplicationConfig(userConfigPromise?: DefineApplicationOptions) {
   return defineConfig(async (config) => {
@@ -21,14 +21,14 @@ function defineApplicationConfig(userConfigPromise?: DefineApplicationOptions) {
     const { command, mode } = config;
     const { application = {}, vite = {} } = options || {};
     const root = process.cwd();
-    const isBuild = command === "build";
+    const isBuild = command === 'build';
     const env = loadEnv(mode, root);
 
     const plugins = await loadApplicationPlugins({
       archiver: true,
       archiverPluginOptions: {},
       compress: false,
-      compressTypes: ["brotli", "gzip"],
+      compressTypes: ['brotli', 'gzip'],
       devtools: true,
       env,
       extraAppConfig: true,
@@ -44,7 +44,7 @@ function defineApplicationConfig(userConfigPromise?: DefineApplicationOptions) {
       nitroMockOptions: {},
       print: !isBuild,
       printInfoMap: {
-        "Vben Admin Docs": "https://doc.vben.pro",
+        'Vben Admin Docs': 'https://doc.vben.pro',
       },
       pwa: true,
       pwaOptions: getDefaultPwaOptions(appTitle),
@@ -60,9 +60,9 @@ function defineApplicationConfig(userConfigPromise?: DefineApplicationOptions) {
       build: {
         rolldownOptions: {
           output: {
-            assetFileNames: "[ext]/[name]-[hash].[ext]",
-            chunkFileNames: "js/[name]-[hash].js",
-            entryFileNames: "jse/index-[name]-[hash].js",
+            assetFileNames: '[ext]/[name]-[hash].[ext]',
+            chunkFileNames: 'js/[name]-[hash].js',
+            entryFileNames: 'jse/index-[name]-[hash].js',
             minify: isBuild
               ? {
                   compress: {
@@ -72,7 +72,7 @@ function defineApplicationConfig(userConfigPromise?: DefineApplicationOptions) {
               : false,
           },
         },
-        target: "es2015",
+        target: 'es2015',
       },
       css: createCssOptions(injectGlobalScss),
       plugins,
@@ -82,15 +82,18 @@ function defineApplicationConfig(userConfigPromise?: DefineApplicationOptions) {
         warmup: {
           // 预热文件
           clientFiles: [
-            "./index.html",
-            "./src/bootstrap.ts",
-            "./src/{views,layouts,router,store,api,adapter}/*",
+            './index.html',
+            './src/bootstrap.ts',
+            './src/{views,layouts,router,store,api,adapter}/*',
           ],
         },
       },
     };
 
-    const mergedCommonConfig = mergeConfig(await getCommonConfig(), applicationConfig);
+    const mergedCommonConfig = mergeConfig(
+      await getCommonConfig(),
+      applicationConfig,
+    );
     return mergeConfig(mergedCommonConfig, vite);
   });
 }

+ 0 - 0
oxfmt.config.mjs → oxfmt.config.ts


+ 0 - 0
oxlint.config.mjs → oxlint.config.ts


+ 46 - 46
vben-admin.code-workspace

@@ -2,179 +2,179 @@
   "folders": [
     {
       "name": "@vben/backend-mock",
-      "path": "apps/backend-mock",
+      "path": "apps/backend-mock"
     },
     {
       "name": "@vben/web-antd",
-      "path": "apps/web-antd",
+      "path": "apps/web-antd"
     },
     {
       "name": "@vben/web-antdv-next",
-      "path": "apps/web-antdv-next",
+      "path": "apps/web-antdv-next"
     },
     {
       "name": "@vben/web-ele",
-      "path": "apps/web-ele",
+      "path": "apps/web-ele"
     },
     {
       "name": "@vben/web-naive",
-      "path": "apps/web-naive",
+      "path": "apps/web-naive"
     },
     {
       "name": "@vben/web-tdesign",
-      "path": "apps/web-tdesign",
+      "path": "apps/web-tdesign"
     },
     {
       "name": "@vben/docs",
-      "path": "docs",
+      "path": "docs"
     },
     {
       "name": "@vben/commitlint-config",
-      "path": "internal/lint-configs/commitlint-config",
+      "path": "internal/lint-configs/commitlint-config"
     },
     {
       "name": "@vben/eslint-config",
-      "path": "internal/lint-configs/eslint-config",
+      "path": "internal/lint-configs/eslint-config"
     },
     {
       "name": "@vben/oxfmt-config",
-      "path": "internal/lint-configs/oxfmt-config",
+      "path": "internal/lint-configs/oxfmt-config"
     },
     {
       "name": "@vben/oxlint-config",
-      "path": "internal/lint-configs/oxlint-config",
+      "path": "internal/lint-configs/oxlint-config"
     },
     {
       "name": "@vben/stylelint-config",
-      "path": "internal/lint-configs/stylelint-config",
+      "path": "internal/lint-configs/stylelint-config"
     },
     {
       "name": "@vben/node-utils",
-      "path": "internal/node-utils",
+      "path": "internal/node-utils"
     },
     {
       "name": "@vben/tsconfig",
-      "path": "internal/tsconfig",
+      "path": "internal/tsconfig"
     },
     {
       "name": "@vben/vite-config",
-      "path": "internal/vite-config",
+      "path": "internal/vite-config"
     },
     {
       "name": "@vben-core/design",
-      "path": "packages/@core/base/design",
+      "path": "packages/@core/base/design"
     },
     {
       "name": "@vben-core/icons",
-      "path": "packages/@core/base/icons",
+      "path": "packages/@core/base/icons"
     },
     {
       "name": "@vben-core/shared",
-      "path": "packages/@core/base/shared",
+      "path": "packages/@core/base/shared"
     },
     {
       "name": "@vben-core/typings",
-      "path": "packages/@core/base/typings",
+      "path": "packages/@core/base/typings"
     },
     {
       "name": "@vben-core/composables",
-      "path": "packages/@core/composables",
+      "path": "packages/@core/composables"
     },
     {
       "name": "@vben-core/preferences",
-      "path": "packages/@core/preferences",
+      "path": "packages/@core/preferences"
     },
     {
       "name": "@vben-core/form-ui",
-      "path": "packages/@core/ui-kit/form-ui",
+      "path": "packages/@core/ui-kit/form-ui"
     },
     {
       "name": "@vben-core/layout-ui",
-      "path": "packages/@core/ui-kit/layout-ui",
+      "path": "packages/@core/ui-kit/layout-ui"
     },
     {
       "name": "@vben-core/menu-ui",
-      "path": "packages/@core/ui-kit/menu-ui",
+      "path": "packages/@core/ui-kit/menu-ui"
     },
     {
       "name": "@vben-core/popup-ui",
-      "path": "packages/@core/ui-kit/popup-ui",
+      "path": "packages/@core/ui-kit/popup-ui"
     },
     {
       "name": "@vben-core/shadcn-ui",
-      "path": "packages/@core/ui-kit/shadcn-ui",
+      "path": "packages/@core/ui-kit/shadcn-ui"
     },
     {
       "name": "@vben-core/tabs-ui",
-      "path": "packages/@core/ui-kit/tabs-ui",
+      "path": "packages/@core/ui-kit/tabs-ui"
     },
     {
       "name": "@vben/constants",
-      "path": "packages/constants",
+      "path": "packages/constants"
     },
     {
       "name": "@vben/access",
-      "path": "packages/effects/access",
+      "path": "packages/effects/access"
     },
     {
       "name": "@vben/common-ui",
-      "path": "packages/effects/common-ui",
+      "path": "packages/effects/common-ui"
     },
     {
       "name": "@vben/hooks",
-      "path": "packages/effects/hooks",
+      "path": "packages/effects/hooks"
     },
     {
       "name": "@vben/layouts",
-      "path": "packages/effects/layouts",
+      "path": "packages/effects/layouts"
     },
     {
       "name": "@vben/plugins",
-      "path": "packages/effects/plugins",
+      "path": "packages/effects/plugins"
     },
     {
       "name": "@vben/request",
-      "path": "packages/effects/request",
+      "path": "packages/effects/request"
     },
     {
       "name": "@vben/icons",
-      "path": "packages/icons",
+      "path": "packages/icons"
     },
     {
       "name": "@vben/locales",
-      "path": "packages/locales",
+      "path": "packages/locales"
     },
     {
       "name": "@vben/preferences",
-      "path": "packages/preferences",
+      "path": "packages/preferences"
     },
     {
       "name": "@vben/stores",
-      "path": "packages/stores",
+      "path": "packages/stores"
     },
     {
       "name": "@vben/styles",
-      "path": "packages/styles",
+      "path": "packages/styles"
     },
     {
       "name": "@vben/types",
-      "path": "packages/types",
+      "path": "packages/types"
     },
     {
       "name": "@vben/utils",
-      "path": "packages/utils",
+      "path": "packages/utils"
     },
     {
       "name": "@vben/playground",
-      "path": "playground",
+      "path": "playground"
     },
     {
       "name": "@vben/turbo-run",
-      "path": "scripts/turbo-run",
+      "path": "scripts/turbo-run"
     },
     {
       "name": "@vben/vsh",
-      "path": "scripts/vsh",
-    },
-  ],
+      "path": "scripts/vsh"
+    }
+  ]
 }