Skip to content

Issue with using <script lang="tsx"> in ~/pages #13435

@danielroe

Description

@danielroe
WARN  [SSR] Error transforming /pages/tkvs/index.vue?vue&type=script&lang.tsx&macro=true: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.

  at formatError (node_modules/.pnpm/vite@2.8.5_sass@1.49.9/node_modules/vite/dist/node/chunks/dep-ff3ab196.js:38098:46)
  at TransformContext.error (node_modules/.pnpm/vite@2.8.5_sass@1.49.9/node_modules/vite/dist/node/chunks/dep-ff3ab196.js:38094:19)
  at TransformContext.transform (node_modules/.pnpm/vite@2.8.5_sass@1.49.9/node_modules/vite/dist/node/chunks/dep-ff3ab196.js:69779:22)
  at async Object.transform (node_modules/.pnpm/vite@2.8.5_sass@1.49.9/node_modules/vite/dist/node/chunks/dep-ff3ab196.js:38334:30)
  at async doTransform (node_modules/.pnpm/vite@2.8.5_sass@1.49.9/node_modules/vite/dist/node/chunks/dep-ff3ab196.js:53030:29)

_Originally posted by @xiao-e-yun in #13443

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions