From 44e294c9cbaf8f6bbccce8b956c7c53d37c15c70 Mon Sep 17 00:00:00 2001 From: Tony Sullivan Date: Tue, 19 Apr 2022 16:31:32 +0000 Subject: [PATCH] Support custom vue compiler options in @astrojs/vue (#3143) * adds support for passing options to @vitejs/plugin-vue * updating vue integration README with options details * adding a tests for custom vue compiler options * chore: adding changeset --- .changeset/neat-buttons-guess.md | 5 ++++ .../fixtures/vue-component/astro.config.mjs | 8 ++++++- .../vue-component/src/components/Result.vue | 1 + packages/astro/test/vue-component.test.js | 3 +++ packages/integrations/vue/README.md | 23 +++++++++++++++++++ packages/integrations/vue/src/index.ts | 9 ++++---- 6 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 .changeset/neat-buttons-guess.md diff --git a/.changeset/neat-buttons-guess.md b/.changeset/neat-buttons-guess.md new file mode 100644 index 000000000..64098a927 --- /dev/null +++ b/.changeset/neat-buttons-guess.md @@ -0,0 +1,5 @@ +--- +'@astrojs/vue': patch +--- + +`@astrojs/vue` integration supports custom vue compiler options diff --git a/packages/astro/test/fixtures/vue-component/astro.config.mjs b/packages/astro/test/fixtures/vue-component/astro.config.mjs index 8a3a38574..0e870b2b4 100644 --- a/packages/astro/test/fixtures/vue-component/astro.config.mjs +++ b/packages/astro/test/fixtures/vue-component/astro.config.mjs @@ -3,5 +3,11 @@ import vue from '@astrojs/vue'; // https://astro.build/config export default defineConfig({ - integrations: [vue()], + integrations: [vue({ + template: { + compilerOptions: { + isCustomElement: tag => tag.includes('my-button') + } + } + })], }); \ No newline at end of file diff --git a/packages/astro/test/fixtures/vue-component/src/components/Result.vue b/packages/astro/test/fixtures/vue-component/src/components/Result.vue index 7795d5ae0..90bf218b2 100644 --- a/packages/astro/test/fixtures/vue-component/src/components/Result.vue +++ b/packages/astro/test/fixtures/vue-component/src/components/Result.vue @@ -1,5 +1,6 @@