Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TypeScript error while using SvelteKit. #517

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

berzanorg
Copy link

Hey, everyone!

Problem

When SvelteKit is chosen as an accompanying UI project, the CLI produces a template project with a TypeScript error.

What this pull request does

This pull request solves the problem by creating hooks.server.ts file instead of hooks.server.js file when the accompanying UI project uses TypeScript.

If the project doesn't use TypeScript, it still creates hooks.server.js file as before.

To reproduce the error:

1 - Install zkapp-cli globally by running the command below.

npm install --global zkapp-cli

2 - Create a project by running the command below.

zk project my-test-project

3 - Choose svelte option as an accompanying UI project.

4 - Choose Skeleton project option as Svelte app template.

5 - Choose Yes, using TypeScript syntax option.

6 - Choose any additional options you want.

7 - Open ui/tsconfig.json file and you will see the error message.

Screenshot

Capture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant