Skip to content

Commit

Permalink
fix: require version instead of pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
elevatebart committed Mar 18, 2022
1 parent b2f9a5c commit da0f721
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vue-inbrowser-compiler-demi/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const fs = require('fs')

function getVuePackageVersion() {
try {
const pkg = require('vue/package.json')
const pkg = require('vue')
return pkg.version
} catch {
return 'unknown'
Expand Down Expand Up @@ -39,8 +39,8 @@ function updateIndexForVue3() {
})
}

const pkg = getVuePackageVersion()
const version = getVuePackageVersion()

if (pkg.version.startsWith('3.')) {
if (version.startsWith('3.')) {
updateIndexForVue3()
}

0 comments on commit da0f721

Please sign in to comment.