Skip to content

webpack template and typescript #622

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

Closed
gorshkov-leonid opened this issue Mar 23, 2017 · 6 comments
Closed

webpack template and typescript #622

gorshkov-leonid opened this issue Mar 23, 2017 · 6 comments

Comments

@gorshkov-leonid
Copy link

Hello,
I tested example with typescript from vue-class-component, it is working. I tried to apply this solution to webpack template. So it is ts-loader+ typescript dependencies, tsconfig.json, lang="ts" of script tag, and webpack rule in webpack.base.conf.js.
But I got error TS18003:
vue_build exe

It is not bug of this repository, but I hope you will help me

@aladdin-add
Copy link
Contributor

aladdin-add commented Mar 27, 2017

add a file named tsconfig.json. just like this:

{
	"compilerOptions": {
		"experimentalDecorators": true,
		"allowSyntheticDefaultImports": true,
		"module": "es2015",
		"moduleResolution": "node",
		"noImplicitAny": true,
		"target": "es5",
		"lib": ["dom", "es5", "es2015.promise"]
	},
	"files": [
		"./src/main.ts"
	]
}

learn more >> tsconfig

@gorshkov-leonid
Copy link
Author

gorshkov-leonid commented Mar 27, 2017

Thank you. But I created https://github.com/gorshkov-leonid/vue-experiments/blob/master/test-vue/tsconfig.json but I do not know which settings can help me/ I used "include" option. And It is working in https://github.com/gorshkov-leonid/vue-experiments/tree/master/vue-ts-loader, but not working in test-vue. tsconfigs are equal.

@gorshkov-leonid
Copy link
Author

I create thread in forum, but quiet yet...
https://forum.vuejs.org/t/vue-webpack-and-typescript/8568

@aladdin-add
Copy link
Contributor

aladdin-add commented Mar 27, 2017

maybe it's because of missing "files" in tsconfig.json, add "files": ["./src/main.ts"] and try again.
I just created a PR to support ts(#633, https://github.com/Aladdin-ADD/vuejs-ts-template), hope it can help you~😺

@LinusBorg
Copy link
Contributor

Sounds like this is solved?

@gorshkov-leonid
Copy link
Author

thank you!

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

No branches or pull requests

3 participants