Skip to content

Commit

Permalink
chore: revert custom license resolve (#12709)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Apr 3, 2023
1 parent 56802b1 commit 621bb2f
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions 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(
Expand Down Expand Up @@ -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' +
Expand Down

0 comments on commit 621bb2f

Please sign in to comment.