Skip to content

Commit

Permalink
feat: support vue 2.7
Browse files Browse the repository at this point in the history
closes #240
  • Loading branch information
KaelWD committed Jun 21, 2022
1 parent b2d25cd commit d43460a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
8 changes: 7 additions & 1 deletion lib/loader.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const path = require('path')
const loaderUtils = require('loader-utils')
const compiler = require('vue-template-compiler')

const vuetifyMatcher = require('./matcher/tag')
const vuetifyAttrsMatcher = require('./matcher/attr')
Expand All @@ -10,6 +9,13 @@ const runtimePaths = {
installDirectives: require.resolve('./runtime/installDirectives')
}

let compiler
try {
compiler = require('vue/compiler-sfc')
} catch (e) {
compiler = require('vue-template-compiler')
}

function getMatches (type, items, matches, component) {
const imports = []

Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,18 @@
"loader-utils": "^2.0.0"
},
"peerDependencies": {
"gm": "^1.23.0",
"pug": "^2.0.0",
"sharp": "^0.21.0",
"vue-template-compiler": "^2.6.10",
"vuetify": "^1.3.0 || ^2.0.0",
"webpack": "^4.0.0 || ^5.0.0"
},
"optionalPeerDependencies": {
"gm": "^1.23.0",
"pug": "^2.0.0",
"sharp": "^0.21.0"
"peerDependenciesMeta": {
"gm": { "optional": true },
"pug": { "optional": true },
"sharp": { "optional": true },
"vue-template-compiler": { "optional": true }
},
"devDependencies": {
"gm": "^1.23.1",
Expand Down

0 comments on commit d43460a

Please sign in to comment.