chore: upgrade to unbuild v3 rc (#18502)

This commit is contained in:
Bjorn Lu 2024-10-29 13:16:13 +08:00 committed by GitHub
parent f97a57893b
commit ddd5c5d00f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 801 additions and 823 deletions

View File

@ -23,7 +23,6 @@ export default defineBuildConfig({
'rollup:options'(_ctx, options) { 'rollup:options'(_ctx, options) {
options.plugins = [ options.plugins = [
options.plugins, options.plugins,
// @ts-expect-error TODO: unbuild uses rollup v3 and Vite uses rollup v4
licensePlugin( licensePlugin(
path.resolve(__dirname, './LICENSE'), path.resolve(__dirname, './LICENSE'),
'create-vite license', 'create-vite license',

View File

@ -39,6 +39,6 @@
"minimist": "^1.2.8", "minimist": "^1.2.8",
"picocolors": "^1.1.1", "picocolors": "^1.1.1",
"prompts": "^2.4.2", "prompts": "^2.4.2",
"unbuild": "^2.0.0" "unbuild": "^3.0.0-rc.11"
} }
} }

View File

@ -57,7 +57,7 @@
"devDependencies": { "devDependencies": {
"acorn": "^8.14.0", "acorn": "^8.14.0",
"picocolors": "^1.1.1", "picocolors": "^1.1.1",
"unbuild": "^2.0.0", "unbuild": "^3.0.0-rc.11",
"vite": "workspace:*" "vite": "workspace:*"
} }
} }

View File

@ -177,7 +177,7 @@ describe.runIf(isBuild)('build tests', () => {
const map = findAssetFile(/with-define-object.*\.js\.map/) const map = findAssetFile(/with-define-object.*\.js\.map/)
expect(formatSourcemapForSnapshot(JSON.parse(map))).toMatchInlineSnapshot(` expect(formatSourcemapForSnapshot(JSON.parse(map))).toMatchInlineSnapshot(`
{ {
"mappings": "qBAEA,SAASA,GAAO,CACJC,GACZ,CAEA,SAASA,GAAY,CAEX,QAAA,MAAM,qBAAsBC,CAAkB,CACxD,CAEAF,EAAK", "mappings": "qBAEA,SAASA,GAAO,CACJC,EAAA,CACZ,CAEA,SAASA,GAAY,CAEX,QAAA,MAAM,qBAAsBC,CAAkB,CACxD,CAEAF,EAAK",
"sources": [ "sources": [
"../../with-define-object.ts", "../../with-define-object.ts",
], ],

File diff suppressed because it is too large Load Diff