File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @tanstack/vite-config ' : minor
3+ ' @tanstack/config ' : minor
4+ ---
5+
6+ feat: support for bundling dependencies
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ export type Options = {
1515 tsconfigPath ?: string
1616 /** Additional dependencies to externalize if not detected by `vite-plugin-externalize-deps` */
1717 externalDeps ?: Array < string | RegExp >
18+ /** Dependencies to bundle. Will be passed to the except argument of `vite-plugin-externalize-deps` */
19+ bundledDeps ?: Array < string | RegExp >
1820 /** Hook called prior to writing each declaration file; allows to transform the content */
1921 beforeWriteDeclarationFile ?: ( filePath : string , content : string ) => string
2022}
Original file line number Diff line number Diff line change @@ -35,7 +35,10 @@ export const tanstackViteConfig = (options) => {
3535
3636 return defineConfig ( {
3737 plugins : [
38- externalizeDeps ( { include : options . externalDeps ?? [ ] } ) ,
38+ externalizeDeps ( {
39+ include : options . externalDeps ?? [ ] ,
40+ except : options . bundledDeps ?? [ ] ,
41+ } ) ,
3942 preserveDirectives ( ) ,
4043 tsconfigPaths ( {
4144 projects : options . tsconfigPath ? [ options . tsconfigPath ] : undefined ,
You can’t perform that action at this time.
0 commit comments