From 0c059f44592559041460c8bc1d7d900abf14fec6 Mon Sep 17 00:00:00 2001 From: sapphi-red Date: Mon, 3 Apr 2023 16:05:22 +0900 Subject: [PATCH] chore: revert custom license resolve --- packages/vite/rollupLicensePlugin.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/packages/vite/rollupLicensePlugin.ts b/packages/vite/rollupLicensePlugin.ts index f1d24f4b7c8e82..d3dce56a7dfeb6 100644 --- a/packages/vite/rollupLicensePlugin.ts +++ b/packages/vite/rollupLicensePlugin.ts @@ -1,9 +1,6 @@ import fs from 'node:fs' -import path from 'node:path' import license from 'rollup-plugin-license' import colors from 'picocolors' -import fg from 'fast-glob' -import resolve from 'resolve' import type { Plugin } from 'rollup' export default function licensePlugin( @@ -66,21 +63,6 @@ export default function licensePlugin( typeof repository === 'string' ? repository : repository.url }\n` } - if (!licenseText && name) { - try { - const pkgDir = path.dirname( - resolve.sync(path.join(name, 'package.json'), { - preserveSymlinks: false, - }), - ) - const licenseFile = fg.sync(`${pkgDir}/LICENSE*`, { - caseSensitiveMatch: false, - })[0] - if (licenseFile) { - licenseText = fs.readFileSync(licenseFile, 'utf-8') - } - } catch {} - } if (licenseText) { text += '\n' +