Skip to content

Commit d72dfdf

Browse files
committed
fix: pass sfc template options to sfc parse
1 parent cc042d5 commit d72dfdf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/transform.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export async function compileFile(
5757
const { errors, descriptor } = store.compiler.parse(code, {
5858
filename,
5959
sourceMap: true,
60+
templateParseOptions: store.options?.template?.compilerOptions,
6061
})
6162
if (errors.length) {
6263
return errors
@@ -221,8 +222,10 @@ export async function compileFile(
221222
if (css) {
222223
compiled.css = css.trim()
223224
} else {
224-
compiled.css = isCE ? (compiled.css = '/* The component style of the custom element will be compiled into the component object */')
225-
: ('/* No <style> tags present */')
225+
compiled.css = isCE
226+
? (compiled.css =
227+
'/* The component style of the custom element will be compiled into the component object */')
228+
: '/* No <style> tags present */'
226229
}
227230

228231
if (clientCode || ssrCode) {

0 commit comments

Comments
 (0)