Skip to content

Commit d3200d4

Browse files
fix(vue3): regression with <script src= handling (Fixes #36)
1 parent b73b133 commit d3200d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/createVue3SFCModule.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ export async function createSFCModule(source : string, filename : string, option
124124

125125
// eg: https://github.com/vuejs/vue-loader/blob/6ed553f70b163031457acc961901313390cde9ef/src/index.ts#L136
126126

127+
// doc: <script setup> cannot be used with the src attribute.
127128
// TBD: check if this is the right solution
128-
if ( descriptor.script.src )
129+
if ( descriptor.script?.src )
129130
descriptor.script.content = (await getFile(resolve(filename, descriptor.script.src))).content;
130131

131132
// TBD: handle <script setup src="...

0 commit comments

Comments
 (0)