Skip to content

Commit db526f0

Browse files
Avi Vahlbrophdawg11
andauthored
fix: warning with vite@8.1.0 (#15230)
* fix: warning with vite@8.1.0 the new vite version started warning about this deprecated option being used. envDir was added in vite@6.3.0, so react-router is safe to use it. refs: https://github.com/vitejs/vite/blob/v8.1.0/packages/vite/CHANGELOG.md vitejs/vite#22555 * docs: add a changelog entry * Apply suggestion from @brophdawg11 --------- Co-authored-by: Matt Brophy <matt@brophy.org>
1 parent ce6dfec commit db526f0

4 files changed

Lines changed: 4 additions & 2 deletions

File tree

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
- Artur-
4848
- ashusnapx
4949
- avipatel97
50+
- AviVahl
5051
- awreese
5152
- aymanemadidi
5253
- ayushmanchhabra
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Replace the deprecated `envFile:false` Vite config with `envDir:false` to eliminate a deprecation warning when using vite@8.1.0+

packages/react-router-dev/vite/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ export const reactRouterVitePlugin: ReactRouterVitePlugin = () => {
14551455
hmr: false,
14561456
},
14571457
configFile: false,
1458-
envFile: false,
1458+
envDir: false,
14591459
plugins: [
14601460
childCompilerPlugins
14611461
// Exclude this plugin from the child compiler to prevent an

packages/react-router-dev/vite/vite-runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export async function createContext({
4646
postcss: {},
4747
},
4848
configFile: false,
49-
envFile: false,
49+
envDir: false,
5050
plugins: [],
5151
environments: {
5252
__config_loader: {

0 commit comments

Comments
 (0)