From bdbfa3698790e9dc655954ab5f985790ca408075 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 29 Oct 2021 09:43:07 +0100 Subject: [PATCH] fix(vite): improve external checks for dev-bundler (#1538) --- packages/bridge/package.json | 2 +- packages/vite/package.json | 2 +- packages/vite/src/server.ts | 1 + yarn.lock | 22 +++++++++++++++------- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/packages/bridge/package.json b/packages/bridge/package.json index e23efbfd62..4afe2cf2cd 100644 --- a/packages/bridge/package.json +++ b/packages/bridge/package.json @@ -27,7 +27,7 @@ "defu": "^5.0.0", "enhanced-resolve": "^5.8.3", "estree-walker": "^2.0.2", - "externality": "^0.1.3", + "externality": "^0.1.4", "fs-extra": "^10.0.0", "globby": "^11.0.4", "hash-sum": "^2.0.0", diff --git a/packages/vite/package.json b/packages/vite/package.json index ad93953942..fbf6494ff3 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -25,7 +25,7 @@ "consola": "^2.15.3", "defu": "^5.0.0", "esbuild": "^0.13.10", - "externality": "^0.1.3", + "externality": "^0.1.4", "fs-extra": "^10.0.0", "magic-string": "^0.25.7", "p-debounce": "^4.0.0", diff --git a/packages/vite/src/server.ts b/packages/vite/src/server.ts index 181e828eae..f85b92b4af 100644 --- a/packages/vite/src/server.ts +++ b/packages/vite/src/server.ts @@ -41,6 +41,7 @@ export async function buildServer (ctx: ViteBuildContext) { external: [], noExternal: [ ...ctx.nuxt.options.build.transpile, + // TODO: Use externality for production (rollup) build /\.(es|esm|esm-browser|esm-bundler).js$/, '/__vue-jsx', '#app', diff --git a/yarn.lock b/yarn.lock index 42f082d014..ed2684bc7c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2394,7 +2394,7 @@ __metadata: defu: ^5.0.0 enhanced-resolve: ^5.8.3 estree-walker: ^2.0.2 - externality: ^0.1.3 + externality: ^0.1.4 fs-extra: ^10.0.0 globby: ^11.0.4 hash-sum: ^2.0.0 @@ -2839,7 +2839,7 @@ __metadata: consola: ^2.15.3 defu: ^5.0.0 esbuild: ^0.13.10 - externality: ^0.1.3 + externality: ^0.1.4 fs-extra: ^10.0.0 magic-string: ^0.25.7 p-debounce: ^4.0.0 @@ -10002,15 +10002,16 @@ __metadata: languageName: node linkType: hard -"externality@npm:^0.1.3": - version: 0.1.3 - resolution: "externality@npm:0.1.3" +"externality@npm:^0.1.4": + version: 0.1.4 + resolution: "externality@npm:0.1.4" dependencies: allowlist: ^0.1.1 enhanced-resolve: ^5.8.3 + mlly: ^0.3.10 + pathe: ^0.2.0 ufo: ^0.7.9 - upath: ^2.0.1 - checksum: 6e08d95d00f187568773630b9de0a7844f029e3e25fb45a291eea5881d9e34c2e6fef6032a84130f652c3a5e4790b0db1cbbdacfa6bef47a41a5aa76e2d56fa4 + checksum: e3afe6641a808c5e86ad03e42142aefdbb7160b3c860876e8f14fd37a91d3e044e5349456c6ddb020b15eb670fada33fa5ca8a0eed22818b7d4c29a6cdfdf273 languageName: node linkType: hard @@ -13561,6 +13562,13 @@ fsevents@~2.3.2: languageName: node linkType: hard +"mlly@npm:^0.3.10": + version: 0.3.10 + resolution: "mlly@npm:0.3.10" + checksum: 065d6d90fccc4fb4022c89726d3e038dda2a4019ca14b7d0dc3515f8d4f17f9881485eba5c698f371431bd887529bfaf2ad74d982d823319cc5b75fec8e80409 + languageName: node + linkType: hard + "mlly@npm:^0.3.6": version: 0.3.7 resolution: "mlly@npm:0.3.7"