wonderful-panda/vue-tsx-support

SSR not working in 3.1.0

Yama-Tomo opened this issue · 4 comments

I use this package with nuxt.js.
SSR not working because the output file type was changed from commonjs to es2015 in v3.1.0.
(SyntaxError: Unexpected token 'export' error occurs on node.js)

Are there any plans to support(build) both commonjs and esmodule?

Are there any plans to support(build) both commonjs and esmodule?

vue-tsx-support allows users to import not only "vue-tsx-support", but also "vue-tsx-support/lib/{vca, modifiers}".
So, supporting multi formats is difficult.

Is there any way to resolve this problem by nuxt.js configuration ?

I solved this issue by transpiled to commonjs by jiti.
Thank you!

@Yama-Tomo can you please explain how did you solve it?

@medairbit In 3.1.0, I used jiti to transpile to commonjs to run SSR.

In 3.2.0, commonjs is supported, so this way is not necessary. I recommend you to use this version.