File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ async function main(): Promise<void> {
75
75
76
76
step ( '\nUpdating package version...' )
77
77
updateVersion ( pkgPath , targetVersion )
78
- if ( pkgName === 'create-vite' ) updateTemplateVersions ( targetVersion )
78
+ if ( pkgName === 'create-vite' ) updateTemplateVersions ( )
79
79
80
80
step ( '\nGenerating changelog...' )
81
81
const changelogArgs = [
Original file line number Diff line number Diff line change @@ -194,8 +194,9 @@ export async function logRecentCommits(pkgName: string) {
194
194
console . log ( )
195
195
}
196
196
197
- export async function updateTemplateVersions ( version : string ) {
198
- if ( / b e t a | a l p h a | r c / . test ( version ) ) return
197
+ export async function updateTemplateVersions ( ) {
198
+ const viteVersion = require ( '../packages/vite/package.json' ) . version
199
+ if ( / b e t a | a l p h a | r c / . test ( viteVersion ) ) return
199
200
200
201
const dir = path . resolve ( __dirname , '../packages/create-vite' )
201
202
@@ -205,7 +206,7 @@ export async function updateTemplateVersions(version: string) {
205
206
for ( const template of templates ) {
206
207
const pkgPath = path . join ( dir , template , `package.json` )
207
208
const pkg = require ( pkgPath )
208
- pkg . devDependencies . vite = `^` + version
209
+ pkg . devDependencies . vite = `^` + viteVersion
209
210
if ( template . startsWith ( 'template-vue' ) ) {
210
211
pkg . devDependencies [ '@vitejs/plugin-vue' ] =
211
212
`^` + require ( '../packages/plugin-vue/package.json' ) . version
You can’t perform that action at this time.
0 commit comments