Skip to content

Commit 1bfc08a

Browse files
committed
fix: ensure same compiler is used for both parse and tempalte compilation
1 parent 0310813 commit 1bfc08a

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

Diff for: lib/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ module.exports = function (source) {
4949

5050
const descriptor = parse({
5151
source,
52+
compiler: options.compiler || require('vue-template-compiler'),
5253
filename,
5354
sourceRoot,
5455
needMap: sourceMap

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"vue-template-compiler": "^2.0.0"
3838
},
3939
"dependencies": {
40-
"@vue/component-compiler-utils": "^1.2.1",
40+
"@vue/component-compiler-utils": "^2.0.0",
4141
"hash-sum": "^1.0.2",
4242
"loader-utils": "^1.1.0",
4343
"vue-hot-reload-api": "^2.3.0",

Diff for: yarn.lock

+18
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,20 @@
720720
source-map "^0.5.6"
721721
vue-template-es2015-compiler "^1.6.0"
722722

723+
"@vue/component-compiler-utils@^2.0.0":
724+
version "2.0.0"
725+
resolved "https://registry.yarnpkg.com/@vue/component-compiler-utils/-/component-compiler-utils-2.0.0.tgz#ea2e46d04c521afbce91a011ae2eb09460362a4b"
726+
dependencies:
727+
consolidate "^0.15.1"
728+
hash-sum "^1.0.2"
729+
lru-cache "^4.1.2"
730+
merge-source-map "^1.1.0"
731+
postcss "^6.0.20"
732+
postcss-selector-parser "^3.1.1"
733+
prettier "^1.13.0"
734+
source-map "^0.5.6"
735+
vue-template-es2015-compiler "^1.6.0"
736+
723737
"@webassemblyjs/[email protected]":
724738
version "1.4.3"
725739
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.4.3.tgz#3b3f6fced944d8660273347533e6d4d315b5934a"
@@ -8173,6 +8187,10 @@ prettier@^1.11.1, prettier@^1.5.3:
81738187
version "1.11.1"
81748188
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75"
81758189

8190+
prettier@^1.13.0:
8191+
version "1.13.4"
8192+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.4.tgz#31bbae6990f13b1093187c731766a14036fa72e6"
8193+
81768194
pretty-bytes@^4.0.2:
81778195
version "4.0.2"
81788196
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"

0 commit comments

Comments
 (0)