ts-extensions-plugin
v0.1.0
Published
find module Definitions in real path
Downloads
3
Maintainers
Readme
ts-extensions-plugin
find module Definitions in real path
so let file behavior like a module
Usage
npm i ts-extensions-plugin -D
or yarn install ts-extensions-plugin -D
// tsconfig.json
{
"compilerOptions": {
"plugins": [{
"name": "ts-extensions-plugin",
"extensions":["vue","scss"] // default ['vue','svelte', 'scss', 'css', 'less', 'png', 'svg']
}]
}
}
If you use vscode , please change typescript to workspace version
Example
// shims-vue.d.ts
declare module '*.vue' {
import Vue from 'vue'
export default Vue
}
// tsconfig.json
{
"compilerOptions": {
"paths": {
"@/*": ["src/*"]
}
}
}
import Foo from '@/components/Foo/index.vue'; // work well