Skip to content

Commit 167ba6d

Browse files
fix: remove rollup-plugin-preserve-directives (#351)
* fix: remove rollup-plugin-preserve-directives * Add changeset * Remove unused @ts-expect-error
1 parent d13f764 commit 167ba6d

File tree

10 files changed

+264
-748
lines changed

10 files changed

+264
-748
lines changed

.changeset/smart-moles-stand.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/vite-config': patch
3+
---
4+
5+
fix: remove rollup-plugin-preserve-directives

integrations/react/snap/cjs/use-client.cjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"use client";
2-
"use client";
32
let react_jsx_runtime = require("react/jsx-runtime");
43
//#region src/use-client.tsx
54
var Component = () => {

integrations/react/snap/cjs/use-client.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integrations/react/snap/esm/use-client.js

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integrations/react/snap/esm/use-client.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/eslint-config/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export const tanstackConfig: Array<Linter.Config> = [
5656
...globals.browser,
5757
},
5858
},
59-
// @ts-expect-error
6059
plugins: jsPlugins,
6160
rules: jsRules,
6261
},
@@ -76,7 +75,6 @@ export const tanstackConfig: Array<Linter.Config> = [
7675
...globals.browser,
7776
},
7877
},
79-
// @ts-expect-error
8078
plugins: jsPlugins,
8179
rules: jsRules,
8280
},

packages/vite-config/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"node": ">=18"
4242
},
4343
"dependencies": {
44-
"rollup-plugin-preserve-directives": "catalog:",
4544
"vite-plugin-dts": "catalog:",
4645
"vite-plugin-externalize-deps": "catalog:",
4746
"vite-tsconfig-paths": "catalog:"

packages/vite-config/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// @ts-check
22

33
import { defineConfig } from 'vite'
4-
import { preserveDirectives } from 'rollup-plugin-preserve-directives'
54
import { externalizeDeps } from 'vite-plugin-externalize-deps'
65
import tsconfigPaths from 'vite-tsconfig-paths'
76
import dts from 'vite-plugin-dts'
@@ -44,7 +43,6 @@ export const tanstackViteConfig = (options: Options): UserConfig => {
4443
include: options.externalDeps ?? [],
4544
except: options.bundledDeps ?? [],
4645
}),
47-
preserveDirectives(),
4846
// Use vite-tsconfig-paths plugin only when a custom tsconfigPath is specified,
4947
// otherwise Vite 8's native resolve.tsconfigPaths handles it
5048
options.tsconfigPath

0 commit comments

Comments
 (0)