Skip to content

Commit

Permalink
chore: Upgrade vite-plugin-dts.
Browse files Browse the repository at this point in the history
Unfortunately, this requires a workaround to work with our
"@/foo/bar"-style imports. I believe this is a regression; see:

qmhc/vite-plugin-dts#70
  • Loading branch information
dhess committed May 7, 2022
1 parent 44eec90 commit d3dddb5
Show file tree
Hide file tree
Showing 6 changed files with 264 additions and 33 deletions.
21 changes: 17 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/primer-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"unified-language-server": "^2.1.0",
"vite": "^2.5.4",
"vite-plugin-checker": "^0.4.2",
"vite-plugin-dts": "^0.9.4",
"vite-plugin-dts": "^1.1.1",
"vite-plugin-optimize-persist": "^0.1.0",
"vite-plugin-package-config": "^0.1.1",
"vite-tsconfig-paths": "^3.3.14"
Expand Down
7 changes: 7 additions & 0 deletions packages/primer-components/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ import { name, version } from "./package.json";

// https://vitejs.dev/config/
export default defineConfig({
// Recent versions of the vite-plugin-dts plugin require this. See:
// https://github.com/qmhc/vite-plugin-dts/issues/70
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
}
},
plugins: [
checker({
typescript: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/primer-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"unified-language-server": "^2.1.0",
"vite": "^2.5.4",
"vite-plugin-checker": "^0.4.2",
"vite-plugin-dts": "^0.9.4",
"vite-plugin-dts": "^1.1.1",
"vite-plugin-optimize-persist": "^0.1.2",
"vite-plugin-package-config": "^0.1.1",
"vite-tsconfig-paths": "^3.3.17"
Expand Down
7 changes: 7 additions & 0 deletions packages/primer-types/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ import { name, version } from "./package.json";

// https://vitejs.dev/config/
export default defineConfig({
// Recent versions of the vite-plugin-dts plugin require this. See:
// https://github.com/qmhc/vite-plugin-dts/issues/70
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
}
},
plugins: [
checker({
typescript: true,
Expand Down

0 comments on commit d3dddb5

Please sign in to comment.