mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
Add typescript shim for .vue files
Signed-off-by: Harry Chen <i@harrychen.xyz>
This commit is contained in:
parent
0aa9a665b8
commit
5d499c4ef7
|
|
@ -0,0 +1,5 @@
|
|||
declare module '*.vue' {
|
||||
import Vue from 'vue';
|
||||
const SFC: Vue.Component;
|
||||
export default SFC;
|
||||
}
|
||||
|
|
@ -2,12 +2,13 @@
|
|||
"include": ["**/*.ts", "**/*.js", "**/*.vue"],
|
||||
"files": [
|
||||
"../node_modules/njs-types/ngx_http_js_module.d.ts",
|
||||
"components.d.ts"
|
||||
"components.d.ts",
|
||||
"shims-vue.d.ts"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"isolatedModules": true,
|
||||
"target": "ESNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"module": "NodeNext"
|
||||
"moduleResolution": "Bundler",
|
||||
"module": "ESNext"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,6 +94,9 @@ export default defineConfig(({ mode }) => ({
|
|||
},
|
||||
};
|
||||
})(),
|
||||
typescript({
|
||||
tsconfig: path.join('_src', "tsconfig.json"),
|
||||
}),
|
||||
vue({
|
||||
template: {
|
||||
preprocessCustomRequire(id) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue