Skip to content

Commit

Permalink
feat: Add vite-tsconfig-paths plugin (#63)
Browse files Browse the repository at this point in the history
* feat: Add vite-tsconfig-paths plugin

* Add jsdoc link for publish function
  • Loading branch information
lachlancollins authored Mar 6, 2024
1 parent 6e9fb71 commit b3ff78d
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"stream-to-array": "^2.3.0",
"v8flags": "^4.0.1",
"vite-plugin-dts": "^3.7.2",
"vite-plugin-externalize-deps": "^0.8.0"
"vite-plugin-externalize-deps": "^0.8.0",
"vite-tsconfig-paths": "^4.3.1"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.13.10",
Expand Down
37 changes: 37 additions & 0 deletions pnpm-lock.yaml

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

1 change: 1 addition & 0 deletions src/build/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export type Options = {
externalDeps?: Array<string | RegExp>
}

/** https://tanstack.com/config/latest/docs/build */
export function tanstackBuildConfig(config: Options): UserConfig
2 changes: 2 additions & 0 deletions src/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { defineConfig } from 'vite'
import { preserveDirectives } from 'rollup-plugin-preserve-directives'
import { externalizeDeps } from 'vite-plugin-externalize-deps'
import tsconfigPaths from 'vite-tsconfig-paths'
import dts from 'vite-plugin-dts'

/**
Expand All @@ -16,6 +17,7 @@ export const tanstackBuildConfig = (options) => {
plugins: [
externalizeDeps({ include: options.externalDeps ?? [] }),
preserveDirectives(),
tsconfigPaths(),
dts({
outDir: `${outDir}/esm`,
entryRoot: options.srcDir,
Expand Down
1 change: 1 addition & 0 deletions src/publish/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { RunOptions } from './types'

/** https://tanstack.com/config/latest/docs/publish */
export function publish(options: RunOptions): Promise<void>

0 comments on commit b3ff78d

Please sign in to comment.