From 49e693eeb54a506d8cc95be498578e38f9a99bef Mon Sep 17 00:00:00 2001 From: Sebastian Dittrich Date: Sat, 29 Jan 2022 23:18:57 +0100 Subject: [PATCH 1/3] Make compilerOptions configurable --- plugins/plugin-vue/plugin.js | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/plugin-vue/plugin.js b/plugins/plugin-vue/plugin.js index 50dac31a5b..1f528ea982 100644 --- a/plugins/plugin-vue/plugin.js +++ b/plugins/plugin-vue/plugin.js @@ -140,6 +140,7 @@ module.exports = function plugin(snowpackConfig, pluginOptions = {}) { preprocessLang: descriptor.template.lang, compilerOptions: { scopeId: scoped ? `data-v-${id}` : null, + ...pluginOptions.compilerOptions, }, }); if (js.errors && js.errors.length > 0) { From f3ed382e281a21a076a882a83350f1e2b935e0c7 Mon Sep 17 00:00:00 2001 From: Sebastian Dittrich Date: Sat, 29 Jan 2022 23:23:52 +0100 Subject: [PATCH 2/3] Update docs for pluginOptions.compilerOptions --- plugins/plugin-vue/README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/plugin-vue/README.md b/plugins/plugin-vue/README.md index 694530fe6d..d19266a3c6 100644 --- a/plugins/plugin-vue/README.md +++ b/plugins/plugin-vue/README.md @@ -22,7 +22,8 @@ export default { You may customize Vue's bundler behavior using the following plugin options. -| Name | Type | Description | -| :------------- | :-------: | :--------------------------------------------------------------------------------------------------- | -| `optionsApi` | `boolean` | Enable/disable [Options API](https://v3.vuejs.org/api/options-api.html) support. Defaults to `true`. | -| `prodDevtools` | `boolean` | Enable/disable devtools support in production. Defaults to `false`. | +| Name | Type | Description | +| :---------------- | :-------: | :--------------------------------------------------------------------------------------------------- | +| `optionsApi` | `boolean` | Enable/disable [Options API](https://v3.vuejs.org/api/options-api.html) support. Defaults to `true`. | +| `prodDevtools` | `boolean` | Enable/disable devtools support in production. Defaults to `false`. | +| `compilerOptions` | `object` | Pass additional configuration to the vue template compiler. Defaults to `{}` | From 6e58a9341f36c7c5e63d37a8fcabb77f8eda6012 Mon Sep 17 00:00:00 2001 From: Sebastian Dittrich Date: Sat, 29 Jan 2022 22:55:57 +0000 Subject: [PATCH 3/3] Add Changeset --- .changeset/sour-grapes-rule.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/sour-grapes-rule.md diff --git a/.changeset/sour-grapes-rule.md b/.changeset/sour-grapes-rule.md new file mode 100644 index 0000000000..fa940e3acc --- /dev/null +++ b/.changeset/sour-grapes-rule.md @@ -0,0 +1,5 @@ +--- +'@snowpack/plugin-vue': minor +--- + +Make Vue compiler configurable