Skip to content

Commit

Permalink
fix: ensure same compiler is used for both parse and tempalte compila…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
yyx990803 committed Jun 3, 2018
1 parent 0310813 commit 1bfc08a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ module.exports = function (source) {

const descriptor = parse({
source,
compiler: options.compiler || require('vue-template-compiler'),
filename,
sourceRoot,
needMap: sourceMap
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"vue-template-compiler": "^2.0.0"
},
"dependencies": {
"@vue/component-compiler-utils": "^1.2.1",
"@vue/component-compiler-utils": "^2.0.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
Expand Down
18 changes: 18 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,20 @@
source-map "^0.5.6"
vue-template-es2015-compiler "^1.6.0"

"@vue/component-compiler-utils@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@vue/component-compiler-utils/-/component-compiler-utils-2.0.0.tgz#ea2e46d04c521afbce91a011ae2eb09460362a4b"
dependencies:
consolidate "^0.15.1"
hash-sum "^1.0.2"
lru-cache "^4.1.2"
merge-source-map "^1.1.0"
postcss "^6.0.20"
postcss-selector-parser "^3.1.1"
prettier "^1.13.0"
source-map "^0.5.6"
vue-template-es2015-compiler "^1.6.0"

"@webassemblyjs/ast@1.4.3":
version "1.4.3"
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.4.3.tgz#3b3f6fced944d8660273347533e6d4d315b5934a"
Expand Down Expand Up @@ -8173,6 +8187,10 @@ prettier@^1.11.1, prettier@^1.5.3:
version "1.11.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75"

prettier@^1.13.0:
version "1.13.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.4.tgz#31bbae6990f13b1093187c731766a14036fa72e6"

pretty-bytes@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
Expand Down

0 comments on commit 1bfc08a

Please sign in to comment.