Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Feb 29, 2024
1 parent 4dcea21 commit 195b2cb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/vite/src/template-tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function templateTag({ inline_source_map } = { inline_source_map: false }
let preprocessor = new Preprocessor();

function candidates(id: string) {
return [id + '.gjs', id + '.gts', id + '/index.gjs', id + '/index.gts'];
return [id + '.gjs', id + '.gts'];
}

return {
Expand Down
10 changes: 9 additions & 1 deletion tests/vite-app/app/components/fancy.gts
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
<template>Yay for gts!</template>
import WithIndex from './with-index';

export const Other = <template>
<WithIndex @message='direct import' />
</template>

<template>
Yay for gts!
</template>

3 changes: 3 additions & 0 deletions tests/vite-app/app/components/with-index/index.gjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default <template>
In Index {{@message}}
</template>
1 change: 1 addition & 0 deletions tests/vite-app/app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{page-title "ViteApp"}}

<Example @message={{this.model.message}} />
<WithIndex @message="compat mode" />

<WelcomePage />
{{! Feel free to remove this! }}
Expand Down

0 comments on commit 195b2cb

Please sign in to comment.