-
-
Notifications
You must be signed in to change notification settings - Fork 245
Ability to work with .vue files. #72
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
Conversation
I just found a critical problem that I'm working to fix. It looks like the |
I found a better way! We just need to rename |
Hey @prograhammer, ts-loader has a similar approach which you might find helpful. See here: https://github.com/TypeStrong/ts-loader/blob/master/README.md#appendtssuffixto-regexp-default You might want to consider aligning option names with the ones used in ts-loader if that's a road you want to travel 👍 |
Yeah @johnnyreilly , I've seen ts-loader do that. But ultimately I think TypeScript just prefers |
That's super interesting. @HerringtonDarkholme I know you're not that keen on how ts-loader does vue. How do you feel about the approach suggested here? Just curious as I think the Vetur extension is your handiwork? |
@HerringtonDarkholme @johnnyreilly These are the benefits I find:
"files.associations": {
"*.vue.ts": "vue"
},
|
Thank @prograhammer for your contribution. And thank you again for your interesting finding. While I don't think every one will like changing extension, it is an effective work around! |
@HerringtonDarkholme @johnnyreilly I got it working fully for |
@prograhammer your PR has been closed.Any way to do that?I want the fork-ts-checker-webpack-plugin can check type for Vue file. |
Hi guys,
This PR adds ability to work with
.vue
files. The files are parsed in such a way as line numbers are preserved. Just ensure the script tag is setts
in your.vue
files, for example:For a quick test, I created a
temp
branch with the builtlib
folder included. So you can install like this:npm install git://github.com/prograhammer/fork-ts-checker-webpack-plugin.git#temp --save-dev
If you are testing in Webpack, (in addition to this plugin) you'll need something like this in your rules:
I also currently use tslint-config-standard so my
tslint.json
looks something like:I'll try to put together a simple typescript example project for you to test with as well. If you are working in VSCode, you'll need extensions Vetur and TSLint Vue (a forked extension which I also currently maintain) and the editor will match the output you get from this
fork-ts-checker-webpack-plugin
.Let me know what more you need. Also, if Vue functionality is too specific for this repo, I can do a fork and release it seperately via
npm
instead.Thanks!