Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 0a4162a

Browse files
authored
fix(Vue 3): add vite plugin to correctly handle jsx (#563)
1 parent fcef4d1 commit 0a4162a

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

e2e/__snapshots__/templates.test.js.snap

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8304,13 +8304,14 @@ app.mount('#app');"
83048304
`;
83058305
83068306
exports[`Templates Vue InstantSearch with Vue 3 File content: vite.config.js 1`] = `
8307-
"import { defineConfig } from 'vite'
8308-
import vue from '@vitejs/plugin-vue'
8307+
"import { defineConfig } from 'vite';
8308+
import vue from '@vitejs/plugin-vue';
8309+
import vueJsx from '@vitejs/plugin-vue-jsx';
83098310
83108311
// https://vitejs.dev/config/
83118312
export default defineConfig({
8312-
plugins: [vue()]
8313-
})"
8313+
plugins: [vue(), vueJsx()],
8314+
});"
83148315
`;
83158316
83168317
exports[`Templates Vue InstantSearch with Vue 3 Folder structure: contains the right files 1`] = `

src/templates/Vue InstantSearch with Vue 3/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
},
1515
"devDependencies": {
1616
"@vitejs/plugin-vue": "2.2.0",
17+
"@vitejs/plugin-vue-jsx": "1.3.7",
1718
"vite": "2.8.0"
1819
}
1920
}
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { defineConfig } from 'vite'
2-
import vue from '@vitejs/plugin-vue'
1+
import { defineConfig } from 'vite';
2+
import vue from '@vitejs/plugin-vue';
3+
import vueJsx from '@vitejs/plugin-vue-jsx';
34

45
// https://vitejs.dev/config/
56
export default defineConfig({
6-
plugins: [vue()]
7-
})
7+
plugins: [vue(), vueJsx()],
8+
});

0 commit comments

Comments
 (0)