Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying lang="tsx" in SFC script section yields compilation error "Failed to resolve loader: tsx-loader" #1219

Closed
dombavetta opened this issue May 3, 2018 · 2 comments

Comments

@dombavetta
Copy link

Version

3.0.0-beta.6

Reproduction link

https://github.com/dombavetta/vue-cli-tsx-test

Steps to reproduce

From the cli:

  • vue create tsx-test
  • select typescript plugin
  • navigation to src/components/HelloWorld.vue, change lang on script section to "tsx"
  • attempt to use jsx

What is expected?

JSX is usable with vue-cli v3 beta. The JSX in the render method will replace the template section in the .vue file and render "Hello World" to the page.

What is actually happening?

The application fails to compile with message: "Failed to compile with 1 errors
Failed to resolve loader: tsx-loader
You may need to install it."


I was porting an existing project over to the cli and once I started moving in files with TSX compilation broke.

@tianlizhao
Copy link

Likewise, JSX also reports errors.

@yyx990803
Copy link
Member

You don't need lang=jsx to use JSX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants