From f57a2455a3a30ccae67cbc636166ddc3c685eb85 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 24 Jan 2018 12:05:40 -0500 Subject: [PATCH] Add babel plugin for vue template preprocessing. This allows precompilation without a vue runtime for nested local components in vue SFCs, and other situations. --- client/.babelrc | 1 + client/package.json | 3 ++- client/yarn.lock | 13 ++++++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/client/.babelrc b/client/.babelrc index d0f4b953ce4c..21f360d74a17 100644 --- a/client/.babelrc +++ b/client/.babelrc @@ -1,6 +1,7 @@ { "presets": ["env"], "moduleIds": true, + "plugins": ["transform-vue-template"], "ignore": [ "i18n.js", "utils/localization.js", diff --git a/client/package.json b/client/package.json index e12ea662bdde..d37b3360be98 100644 --- a/client/package.json +++ b/client/package.json @@ -57,6 +57,7 @@ "devDependencies": { "babel-core": "^6.24.0", "babel-loader": "^7.1.1", + "babel-plugin-transform-vue-template": "^0.3.1", "babel-preset-env": "^1.6.1", "concurrently": "^3.5.1", "css-loader": "^0.28.7", @@ -93,7 +94,7 @@ "qunitjs": "^2.4.1", "sinon": "^4.1.2", "vue-loader": "^13.5.0", - "vue-template-compiler": "^2.5.9", + "vue-template-compiler": "^2.5.13", "webpack": "^3.10.0" } } diff --git a/client/yarn.lock b/client/yarn.lock index f9a2e3d5f09c..46ea1084ed04 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -887,6 +887,13 @@ babel-plugin-transform-strict-mode@^6.24.1: babel-runtime "^6.22.0" babel-types "^6.24.1" +babel-plugin-transform-vue-template@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-vue-template/-/babel-plugin-transform-vue-template-0.3.1.tgz#9681fa2fae40c0248e52852b7aebd51ce6a5ac2f" + dependencies: + babylon "^6.17.4" + vue-template-es2015-compiler "^1.5.3" + babel-preset-env@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48" @@ -1022,7 +1029,7 @@ babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0, babel-types@^6.7. lodash "^4.17.4" to-fast-properties "^1.0.3" -babylon@^6.1.0, babylon@^6.18.0: +babylon@^6.1.0, babylon@^6.17.4, babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" @@ -7531,14 +7538,14 @@ vue-style-loader@^3.0.0: hash-sum "^1.0.2" loader-utils "^1.0.2" -vue-template-compiler@^2.5.9: +vue-template-compiler@^2.5.13: version "2.5.13" resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.5.13.tgz#12a2aa0ecd6158ac5e5f14d294b0993f399c3d38" dependencies: de-indent "^1.0.2" he "^1.1.0" -vue-template-es2015-compiler@^1.6.0: +vue-template-es2015-compiler@^1.5.3, vue-template-es2015-compiler@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.6.0.tgz#dc42697133302ce3017524356a6c61b7b69b4a18"