From 1bf76c618bd0d7cff228dc6f8c513fb8d2a54684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E4=BB=99?= <615206459@qq.com> Date: Sun, 13 Oct 2024 00:40:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20eps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/vite-plugin/dist/index.js | 2 +- packages/vite-plugin/package.json | 1 + packages/vite-plugin/pnpm-lock.yaml | 8 ++++++++ packages/vite-plugin/rollup.config.js | 2 +- packages/vite-plugin/src/ctx/index.ts | 2 +- packages/vite-plugin/src/eps/index.ts | 2 +- packages/vite-plugin/src/index.ts | 2 +- 7 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/vite-plugin/dist/index.js b/packages/vite-plugin/dist/index.js index 5179f85..eaafcdd 100644 --- a/packages/vite-plugin/dist/index.js +++ b/packages/vite-plugin/dist/index.js @@ -272,7 +272,7 @@ `; if (!ignore.includes(item.name)) { ignore.push(item.name); - t0 += t; + t0 += t + "\n\n"; } } return t0; diff --git a/packages/vite-plugin/package.json b/packages/vite-plugin/package.json index be0320d..f30c7e0 100644 --- a/packages/vite-plugin/package.json +++ b/packages/vite-plugin/package.json @@ -32,6 +32,7 @@ "@vue/compiler-sfc": "^3.4.24", "axios": "^1.6.8", "glob": "^10.3.12", + "lodash": "^4.17.21", "lodash-es": "^4.17.21", "magic-string": "^0.30.10", "prettier": "^3.2.5", diff --git a/packages/vite-plugin/pnpm-lock.yaml b/packages/vite-plugin/pnpm-lock.yaml index b3739be..8c779d3 100644 --- a/packages/vite-plugin/pnpm-lock.yaml +++ b/packages/vite-plugin/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: glob: specifier: ^10.3.12 version: 10.3.12 + lodash: + specifier: ^4.17.21 + version: 4.17.21 lodash-es: specifier: ^4.17.21 version: 4.17.21 @@ -847,6 +850,9 @@ packages: lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + lru-cache@10.2.0: resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} engines: {node: 14 || >=16.14} @@ -1868,6 +1874,8 @@ snapshots: lodash.merge@4.6.2: {} + lodash@4.17.21: {} + lru-cache@10.2.0: {} lru-cache@6.0.0: diff --git a/packages/vite-plugin/rollup.config.js b/packages/vite-plugin/rollup.config.js index 58f2ac5..a704a58 100644 --- a/packages/vite-plugin/rollup.config.js +++ b/packages/vite-plugin/rollup.config.js @@ -5,7 +5,7 @@ import { defineConfig } from "rollup"; export default defineConfig({ input: ["src/index.ts"], - external: ["lodash-es"], + external: ["lodash"], output: { name: "index", diff --git a/packages/vite-plugin/src/ctx/index.ts b/packages/vite-plugin/src/ctx/index.ts index 35c44fb..e149260 100644 --- a/packages/vite-plugin/src/ctx/index.ts +++ b/packages/vite-plugin/src/ctx/index.ts @@ -1,7 +1,7 @@ import { join } from "path"; import { readFile, rootDir, writeFile, error } from "../utils"; import { glob } from "glob"; -import { assign, cloneDeep, isEqual, orderBy } from "lodash-es"; +import { assign, cloneDeep, isEqual, orderBy } from "lodash"; import { config } from "../config"; import fs from "fs"; import axios from "axios"; diff --git a/packages/vite-plugin/src/eps/index.ts b/packages/vite-plugin/src/eps/index.ts index 5b98688..6c8423a 100644 --- a/packages/vite-plugin/src/eps/index.ts +++ b/packages/vite-plugin/src/eps/index.ts @@ -1,7 +1,7 @@ import { createDir, error, firstUpperCase, readFile, rootDir, toCamel } from "../utils"; import { join } from "path"; import axios from "axios"; -import { isArray, isEmpty, last, merge, values } from "lodash-es"; +import { isArray, isEmpty, last, merge, values } from "lodash"; import { createWriteStream } from "fs"; import prettier from "prettier"; import { config } from "../config"; diff --git a/packages/vite-plugin/src/index.ts b/packages/vite-plugin/src/index.ts index e27f4a9..d28d994 100644 --- a/packages/vite-plugin/src/index.ts +++ b/packages/vite-plugin/src/index.ts @@ -3,7 +3,7 @@ import { config } from "./config"; import { demo } from "./demo"; import { virtual } from "./virtual"; import type { Config } from "../types"; -import { merge } from "lodash-es"; +import { merge } from "lodash"; export function cool(options: Config.Options) { // 应用类型,admin | app