Skip to content

Commit

Permalink
fix: pass sfc template options to sfc parse
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 2, 2024
1 parent cc042d5 commit d72dfdf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export async function compileFile(
const { errors, descriptor } = store.compiler.parse(code, {
filename,
sourceMap: true,
templateParseOptions: store.options?.template?.compilerOptions,
})
if (errors.length) {
return errors
Expand Down Expand Up @@ -221,8 +222,10 @@ export async function compileFile(
if (css) {
compiled.css = css.trim()
} else {
compiled.css = isCE ? (compiled.css = '/* The component style of the custom element will be compiled into the component object */')
: ('/* No <style> tags present */')
compiled.css = isCE
? (compiled.css =
'/* The component style of the custom element will be compiled into the component object */')
: '/* No <style> tags present */'
}

if (clientCode || ssrCode) {
Expand Down

0 comments on commit d72dfdf

Please sign in to comment.