Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
felix committed Jun 25, 2024
1 parent c58cbbf commit c5dbd5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ export default defineNuxtModule<ModuleOptions>({
imports: ['useHanko'],
})

addTemplate({
const hankoElementsTemplate = addTemplate({
filename: 'hanko-elements.mjs',
getContents: () => `export const Hanko = () => null`,
})

nuxt.hook('vite:extendConfig', (config, { isServer }) => {
if (isServer) {
config.resolve!.alias = defu(config.resolve!.alias, {
'@teamhanko/hanko-elements': '#build/hanko-elements',
'@teamhanko/hanko-elements': hankoElementsTemplate.dst,
})
}
})
Expand Down

0 comments on commit c5dbd5c

Please sign in to comment.