Skip to content

Typescript is not compiled #918

@Aloento

Description

@Aloento

Describe the bug
yarn create wmr
rename public\index.js to public\index.tsx

- export async function prerender(data) {
+ export async function prerender(data: JSX.IntrinsicAttributes) {
	return await ssr(<App {...data} />);
}

then:

500 ./public\index.js - Unexpected token (./index.js:27:37)

  25 | hydrate(<App />);
  26 |
> 27 | export async function prerender(data: JSX.IntrinsicAttributes) {
     |                                     ^
  28 |   return await ssr(<App {...data} />);
  29 | }

Bug occurs with:

  • wmr or wmr start (development)
  • wmr serve
  • wmr build (production)

Desktop (please complete the following information):

  • Node Version: 17
  • WMR Version: newest

Additional context
Does this mean we need to enable @rollup/plugin-typescript ourselves?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions