Skip to content

Commit

Permalink
feat(vite): migrate to latest vite-plugin-dts (#22614)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9e13c85)
  • Loading branch information
Coly010 authored and FrozenPandaz committed Apr 2, 2024
1 parent b224d65 commit 78f5c62
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import * as path from 'path';
plugins: [react(),
nxViteTsPaths(),
dts({ entryRoot: 'src', tsConfigFilePath: path.join(__dirname, 'tsconfig.lib.json'), skipDiagnostics: true })],
dts({ entryRoot: 'src', tsconfigPath: path.join(__dirname, 'tsconfig.lib.json') })],
// Uncomment this if you are using workers.
// worker: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ export default defineConfig({
nxViteTsPaths(),
dts({
entryRoot: 'src',
tsConfigFilePath: path.join(__dirname, 'tsconfig.lib.json'),
skipDiagnostics: true,
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json'),
}),
],
Expand Down Expand Up @@ -70,8 +69,7 @@ export default defineConfig({
nxViteTsPaths(),
dts({
entryRoot: 'src',
tsConfigFilePath: path.join(__dirname, 'tsconfig.lib.json'),
skipDiagnostics: true,
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json'),
}),
],
Expand Down Expand Up @@ -157,8 +155,7 @@ export default defineConfig({
react(),
dts({
entryRoot: 'src',
tsConfigFilePath: path.join(__dirname, 'tsconfig.lib.json'),
skipDiagnostics: true,
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json'),
}),
],
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/utils/generator-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ export function createOrEditViteConfig(

if (!onlyVitest && options.includeLib) {
plugins.push(
`dts({ entryRoot: 'src', tsConfigFilePath: path.join(__dirname, 'tsconfig.lib.json'), skipDiagnostics: true })`
`dts({ entryRoot: 'src', tsconfigPath: path.join(__dirname, 'tsconfig.lib.json') })`
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const vitestVersion = '^1.3.1';
export const vitePluginReactVersion = '^4.2.0';
export const vitePluginReactSwcVersion = '^3.5.0';
export const jsdomVersion = '~22.1.0';
export const vitePluginDtsVersion = '~2.3.0';
export const vitePluginDtsVersion = '~3.8.1';
export const happyDomVersion = '~9.20.3';
export const edgeRuntimeVmVersion = '~3.0.2';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ export default defineConfig({
nxViteTsPaths(),
dts({
entryRoot: 'src',
tsConfigFilePath: path.join(__dirname, 'tsconfig.lib.json'),
skipDiagnostics: true,
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json'),
}),
],
Expand Down Expand Up @@ -114,8 +113,7 @@ export default defineConfig({
nxViteTsPaths(),
dts({
entryRoot: 'src',
tsConfigFilePath: path.join(__dirname, 'tsconfig.lib.json'),
skipDiagnostics: true,
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json'),
}),
],
Expand Down

0 comments on commit 78f5c62

Please sign in to comment.