mirror of https://github.com/vuejs/core.git
chore: bump vite and esbuild
This commit is contained in:
parent
ce064a172b
commit
ec4531a6b3
|
@ -74,7 +74,7 @@
|
||||||
"conventional-changelog-cli": "^2.0.31",
|
"conventional-changelog-cli": "^2.0.31",
|
||||||
"csstype": "^3.0.3",
|
"csstype": "^3.0.3",
|
||||||
"enquirer": "^2.3.2",
|
"enquirer": "^2.3.2",
|
||||||
"esbuild": "^0.15.13",
|
"esbuild": "^0.17.4",
|
||||||
"eslint": "^7.7.0",
|
"eslint": "^7.7.0",
|
||||||
"eslint-plugin-jest": "26.1.5",
|
"eslint-plugin-jest": "26.1.5",
|
||||||
"execa": "^4.0.2",
|
"execa": "^4.0.2",
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
"ts-jest": "^29.0.3",
|
"ts-jest": "^29.0.3",
|
||||||
"tslib": "^2.4.0",
|
"tslib": "^2.4.0",
|
||||||
"typescript": "^4.8.0",
|
"typescript": "^4.8.0",
|
||||||
"vite": "^3.0.0",
|
"vite": "^4.0.4",
|
||||||
"vue": "workspace:*"
|
"vue": "workspace:*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
"serve": "vite preview"
|
"serve": "vite preview"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-vue": "^3.0.0",
|
"@vitejs/plugin-vue": "^4.0.0",
|
||||||
"vite": "^3.0.0"
|
"vite": "^4.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vue": "3.2.45",
|
"vue": "3.2.45",
|
||||||
|
|
917
pnpm-lock.yaml
917
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -3,7 +3,7 @@
|
||||||
// smaller files w/ better tree-shaking.
|
// smaller files w/ better tree-shaking.
|
||||||
|
|
||||||
// @ts-check
|
// @ts-check
|
||||||
const { build } = require('esbuild')
|
const { context } = require('esbuild')
|
||||||
const nodePolyfills = require('@esbuild-plugins/node-modules-polyfill')
|
const nodePolyfills = require('@esbuild-plugins/node-modules-polyfill')
|
||||||
const { resolve, relative } = require('path')
|
const { resolve, relative } = require('path')
|
||||||
const args = require('minimist')(process.argv.slice(2))
|
const args = require('minimist')(process.argv.slice(2))
|
||||||
|
@ -68,7 +68,22 @@ if (!inlineDeps) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
build({
|
const plugins = [
|
||||||
|
{
|
||||||
|
name: 'log-rebuild',
|
||||||
|
setup(build) {
|
||||||
|
build.onEnd(() => {
|
||||||
|
console.log(`built: ${relativeOutfile}`)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
if (format === 'cjs' || pkg.buildOptions?.enableNonBrowserBranches) {
|
||||||
|
plugins.push(nodePolyfills.default())
|
||||||
|
}
|
||||||
|
|
||||||
|
context({
|
||||||
entryPoints: [resolve(__dirname, `../packages/${target}/src/index.ts`)],
|
entryPoints: [resolve(__dirname, `../packages/${target}/src/index.ts`)],
|
||||||
outfile,
|
outfile,
|
||||||
bundle: true,
|
bundle: true,
|
||||||
|
@ -77,10 +92,7 @@ build({
|
||||||
format: outputFormat,
|
format: outputFormat,
|
||||||
globalName: pkg.buildOptions?.name,
|
globalName: pkg.buildOptions?.name,
|
||||||
platform: format === 'cjs' ? 'node' : 'browser',
|
platform: format === 'cjs' ? 'node' : 'browser',
|
||||||
plugins:
|
plugins,
|
||||||
format === 'cjs' || pkg.buildOptions?.enableNonBrowserBranches
|
|
||||||
? [nodePolyfills.default()]
|
|
||||||
: undefined,
|
|
||||||
define: {
|
define: {
|
||||||
__COMMIT__: `"dev"`,
|
__COMMIT__: `"dev"`,
|
||||||
__VERSION__: `"${pkg.version}"`,
|
__VERSION__: `"${pkg.version}"`,
|
||||||
|
@ -98,12 +110,5 @@ build({
|
||||||
__FEATURE_SUSPENSE__: `true`,
|
__FEATURE_SUSPENSE__: `true`,
|
||||||
__FEATURE_OPTIONS_API__: `true`,
|
__FEATURE_OPTIONS_API__: `true`,
|
||||||
__FEATURE_PROD_DEVTOOLS__: `false`
|
__FEATURE_PROD_DEVTOOLS__: `false`
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
onRebuild(error) {
|
|
||||||
if (!error) console.log(`rebuilt: ${relativeOutfile}`)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}).then(() => {
|
}).then(ctx => ctx.watch())
|
||||||
console.log(`watching: ${relativeOutfile}`)
|
|
||||||
})
|
|
||||||
|
|
Loading…
Reference in New Issue