Skip to content

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