We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.6.0
https://github.com/prigaux/vue-cli-prefer-ts-over-js
Have both foo.js and foo.ts files in the same directory. Use import ... from './foo'
foo.js
foo.ts
import ... from './foo'
foo.ts should be used
foo.js is used instead
This is an issue when foo.ts is shared between server (tsc generates foo.js) and client (vue).
ensure '.ts' and '.tsx' are added in front of config.resolve.extensions in file @vue/cli-plugin-typescript/index.js
config.resolve.extensions
@vue/cli-plugin-typescript/index.js
add this to vue.config.js
module.exports = { ... chainWebpack: config => { config.resolve.extensions.prepend('.ts') }, }
The text was updated successfully, but these errors were encountered:
chore: prefer .tsx? files over .jsx? file extensions (#3909)
0c635af
close #3898
c3b6519
close #3898 (cherry picked from commit 0c635af)
Successfully merging a pull request may close this issue.
Version
3.6.0
Reproduction link
https://github.com/prigaux/vue-cli-prefer-ts-over-js
Steps to reproduce
Have both
foo.js
andfoo.ts
files in the same directory. Useimport ... from './foo'
What is expected?
foo.ts
should be usedWhat is actually happening?
foo.js
is used insteadThis is an issue when foo.ts is shared between server (tsc generates foo.js) and client (vue).
Suggested fix
ensure '.ts' and '.tsx' are added in front of
config.resolve.extensions
in file@vue/cli-plugin-typescript/index.js
Workaround
add this to vue.config.js
The text was updated successfully, but these errors were encountered: