Skip to content

Commit

Permalink
chore: broken types
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Aug 16, 2024
1 parent cad0f44 commit d83576a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plugins/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,12 @@ export function NuxtScriptBundleTransformer(options: AssetBundlerTransformerOpti
canBundle = true
}
}
// @ts-expect-error untyped
const scriptOptions = node.arguments[0].properties?.find(
(p: any) => (p.key?.name === 'scriptOptions'),
) as Property | undefined
// we need to check if scriptOptions contains bundle: true, if it exists
// @ts-expect-error untyped
const bundleOption = scriptOptions?.value.properties?.find((prop) => {
return prop.type === 'Property' && prop.key?.name === 'bundle' && prop.value.type === 'Literal'
})
Expand Down

0 comments on commit d83576a

Please sign in to comment.