@tanstack/vite-config 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/vite-config",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Shared Vite build config used by TanStack projects.",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -35,11 +35,11 @@
35
35
  "dependencies": {
36
36
  "rollup-plugin-preserve-directives": "^0.4.0",
37
37
  "vite-plugin-dts": "4.2.3",
38
- "vite-plugin-externalize-deps": "^0.9.0",
38
+ "vite-plugin-externalize-deps": "^0.10.0",
39
39
  "vite-tsconfig-paths": "^5.1.4"
40
40
  },
41
41
  "devDependencies": {
42
- "vite": "^7.1.7"
42
+ "vite": "^7.1.9"
43
43
  },
44
44
  "scripts": {
45
45
  "test:types": "tsc",
package/src/index.d.ts CHANGED
@@ -15,6 +15,8 @@ export type Options = {
15
15
  tsconfigPath?: string
16
16
  /** Additional dependencies to externalize if not detected by `vite-plugin-externalize-deps` */
17
17
  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>
18
20
  /** Hook called prior to writing each declaration file; allows to transform the content */
19
21
  beforeWriteDeclarationFile?: (filePath: string, content: string) => string
20
22
  }
package/src/index.js CHANGED
@@ -35,7 +35,10 @@ export const tanstackViteConfig = (options) => {
35
35
 
36
36
  return defineConfig({
37
37
  plugins: [
38
- externalizeDeps({ include: options.externalDeps ?? [] }),
38
+ externalizeDeps({
39
+ include: options.externalDeps ?? [],
40
+ except: options.bundledDeps ?? [],
41
+ }),
39
42
  preserveDirectives(),
40
43
  tsconfigPaths({
41
44
  projects: options.tsconfigPath ? [options.tsconfigPath] : undefined,