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",
|
||||
"csstype": "^3.0.3",
|
||||
"enquirer": "^2.3.2",
|
||||
"esbuild": "^0.15.13",
|
||||
"esbuild": "^0.17.4",
|
||||
"eslint": "^7.7.0",
|
||||
"eslint-plugin-jest": "26.1.5",
|
||||
"execa": "^4.0.2",
|
||||
|
@ -102,7 +102,7 @@
|
|||
"ts-jest": "^29.0.3",
|
||||
"tslib": "^2.4.0",
|
||||
"typescript": "^4.8.0",
|
||||
"vite": "^3.0.0",
|
||||
"vite": "^4.0.4",
|
||||
"vue": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
"serve": "vite preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^3.0.0",
|
||||
"vite": "^3.0.0"
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"vite": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"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.
|
||||
|
||||
// @ts-check
|
||||
const { build } = require('esbuild')
|
||||
const { context } = require('esbuild')
|
||||
const nodePolyfills = require('@esbuild-plugins/node-modules-polyfill')
|
||||
const { resolve, relative } = require('path')
|
||||
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`)],
|
||||
outfile,
|
||||
bundle: true,
|
||||
|
@ -77,10 +92,7 @@ build({
|
|||
format: outputFormat,
|
||||
globalName: pkg.buildOptions?.name,
|
||||
platform: format === 'cjs' ? 'node' : 'browser',
|
||||
plugins:
|
||||
format === 'cjs' || pkg.buildOptions?.enableNonBrowserBranches
|
||||
? [nodePolyfills.default()]
|
||||
: undefined,
|
||||
plugins,
|
||||
define: {
|
||||
__COMMIT__: `"dev"`,
|
||||
__VERSION__: `"${pkg.version}"`,
|
||||
|
@ -98,12 +110,5 @@ build({
|
|||
__FEATURE_SUSPENSE__: `true`,
|
||||
__FEATURE_OPTIONS_API__: `true`,
|
||||
__FEATURE_PROD_DEVTOOLS__: `false`
|
||||
},
|
||||
watch: {
|
||||
onRebuild(error) {
|
||||
if (!error) console.log(`rebuilt: ${relativeOutfile}`)
|
||||
}
|
||||
}
|
||||
}).then(() => {
|
||||
console.log(`watching: ${relativeOutfile}`)
|
||||
})
|
||||
}).then(ctx => ctx.watch())
|
||||
|
|
Loading…
Reference in New Issue