File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const importMeta = require('@babel/plugin-syntax-import-meta')
5
5
const hash = require ( 'hash-sum' )
6
6
7
7
/**
8
- * @param {import('. ').Options } options
8
+ * @param {import('@vue/babel-plugin-jsx ').VueJSXPluginOptions } options
9
9
* @returns {import('vite').Plugin }
10
10
*/
11
11
function vueJsxPlugin ( options = { } ) {
@@ -35,7 +35,7 @@ function vueJsxPlugin(options = {}) {
35
35
needSourceMap = config . command === 'serve' || ! ! config . build . sourcemap
36
36
} ,
37
37
38
- transform ( code , id ) {
38
+ transform ( code , id , ssr ) {
39
39
if ( / \. [ j t ] s x $ / . test ( id ) ) {
40
40
const plugins = [ importMeta , [ jsx , options ] ]
41
41
if ( id . endsWith ( '.tsx' ) ) {
@@ -53,7 +53,7 @@ function vueJsxPlugin(options = {}) {
53
53
sourceFileName : id
54
54
} )
55
55
56
- if ( ! needHmr ) {
56
+ if ( ssr || ! needHmr ) {
57
57
return {
58
58
code : result . code ,
59
59
map : result . map
You can’t perform that action at this time.
0 commit comments