Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

TSX Can not be built with Rollup (Vue 3) #453

Open
@snowdream

Description

@snowdream

Version

5.0.0

Reproduction link

github.com/snowdreamtech/ruim

Steps to reproduce

rollup -c

What is expected?

Build with no error.

What is actually happening?

ruim git:(master) rollup -c       

src/components/helloworld/HelloWorld.tsx → dist/helloworld/helloworld.cjs.js, dist/helloworld/helloworld.esm.js, dist/helloworld/helloworld.js...
(!) Error when using sourcemap for reporting an error: Can't resolve original location of error.
src/components/helloworld/HelloWorld.tsx (13:22)
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
src/components/helloworld/HelloWorld.tsx (13:22)
11:             count.value++;
12:         };
13:         return () => (<>
                         ^
14:         <h1>{msg}</h1>
Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
   at error (/Users/snowdream/.nvm/versions/node/v15.13.0/lib/node_modules/rollup/dist/shared/rollup.js:151:30)
   at Module.error (/Users/snowdream/.nvm/versions/node/v15.13.0/lib/node_modules/rollup/dist/shared/rollup.js:10059:16)
   at Module.tryParse (/Users/snowdream/.nvm/versions/node/v15.13.0/lib/node_modules/rollup/dist/shared/rollup.js:10462:25)
   at Module.setSource (/Users/snowdream/.nvm/versions/node/v15.13.0/lib/node_modules/rollup/dist/shared/rollup.js:10365:24)
   at ModuleLoader.addModuleSource (/Users/snowdream/.nvm/versions/node/v15.13.0/lib/node_modules/rollup/dist/shared/rollup.js:19708:20)
   at async ModuleLoader.fetchModule (/Users/snowdream/.nvm/versions/node/v15.13.0/lib/node_modules/rollup/dist/shared/rollup.js:19761:9)
   at async Promise.all (index 0)

like
@vitejs/plugin-vue
@vitejs/plugin-vue-jsx

should we need a plugin like rollup-plugin-vue-jsx?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions