From e32a3a8573816ad8d0d441c09fbc36078cc67f0c Mon Sep 17 00:00:00 2001 From: ygj6 <7699524+ygj6@users.noreply.github.com> Date: Thu, 5 May 2022 17:18:20 +0800 Subject: [PATCH] test(optimize-missing-deps): rewrite deps in CJS (#8025) --- .../playground/optimize-missing-deps/missing-dep/index.js | 4 ++-- packages/playground/optimize-missing-deps/package.json | 3 +-- pnpm-lock.yaml | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/playground/optimize-missing-deps/missing-dep/index.js b/packages/playground/optimize-missing-deps/missing-dep/index.js index f5d61c545d080a..63531f70e55ed0 100644 --- a/packages/playground/optimize-missing-deps/missing-dep/index.js +++ b/packages/playground/optimize-missing-deps/missing-dep/index.js @@ -1,5 +1,5 @@ -import { name } from 'multi-entry-dep' +const { name } = require('multi-entry-dep') -export function sayName() { +exports.sayName = () => { return name } diff --git a/packages/playground/optimize-missing-deps/package.json b/packages/playground/optimize-missing-deps/package.json index 431cf3b33c3847..8281a68664b03a 100644 --- a/packages/playground/optimize-missing-deps/package.json +++ b/packages/playground/optimize-missing-deps/package.json @@ -7,8 +7,7 @@ "postinstall": "ts-node ../../../scripts/patchFileDeps.ts" }, "dependencies": { - "missing-dep": "file:./missing-dep", - "multi-entry-dep": "file:./multi-entry-dep" + "missing-dep": "file:./missing-dep" }, "devDependencies": { "express": "^4.17.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 57fa85d5aaacf7..d3aea697843c5b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -401,10 +401,8 @@ importers: specifiers: express: ^4.17.1 missing-dep: file:./missing-dep - multi-entry-dep: file:./multi-entry-dep dependencies: missing-dep: link:missing-dep - multi-entry-dep: link:multi-entry-dep devDependencies: express: 4.17.2