Skip to content

Commit

Permalink
fix(vue): Fixing tsconfig types override and shim for SFCs for nx/vit…
Browse files Browse the repository at this point in the history
…e type check, fixes #995
  • Loading branch information
gionkunz authored and DominikPieper committed Aug 19, 2023
1 parent 7b5cbc6 commit cd64086
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module '*.vue' {
import { defineComponent } from 'vue';
const component: ReturnType<typeof defineComponent>;
export default component;
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "<%= offsetFromRoot %>dist/out-tsc",
"types": ["node"]
"outDir": "<%= offsetFromRoot %>dist/out-tsc"
},
"files": [],
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts", "src/**/*.spec.tsx", "src/**/*.test.tsx", "src/**/*.spec.js", "src/**/*.test.js", "src/**/*.spec.jsx", "src/**/*.test.jsx"],
"include": ["env.d.ts", "src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module '*.vue' {
import { defineComponent } from 'vue';
const component: ReturnType<typeof defineComponent>;
export default component;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

// No `ScriptHost` because Vue 3 dropped support for IE
],
"outDir": "<%= offsetFromRoot %>dist/out-tsc",
"types": ["node"]
"outDir": "<%= offsetFromRoot %>dist/out-tsc"
},
"files": [],
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts", "src/**/*.spec.tsx", "src/**/*.test.tsx", "src/**/*.spec.js", "src/**/*.test.js", "src/**/*.spec.jsx", "src/**/*.test.jsx"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { generateFiles, names, offsetFromRoot, Tree } from '@nx/devkit';
import { NormalizedSchema } from '../schema';
import { join } from 'path';
import { getRelativePathToRootTsConfig } from '@nx/workspace/src/utilities/typescript';
import { getRelativePathToRootTsConfig } from '@nx/js';
import { createTsConfig } from '../../utils/create-ts-config';

export function createLibraryFiles(host: Tree, options: NormalizedSchema) {
Expand Down

0 comments on commit cd64086

Please sign in to comment.