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' +