Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7784f30

Browse files
committed
fix: skip defining variables
This fixes the issue that caused a production build of React to be used in tests. If this causes issues with other builds, please let me know.
1 parent a30bd93 commit 7784f30

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

‎scripts/vite.config.mts‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { InlineConfig } from "vite";
2-
import { __DEV__, resolve as r } from "./utils.mjs";
3-
import * as fs from "fs-extra";
4-
import react from "@vitejs/plugin-react";
5-
import * as packageJson from '../package.json';
1+
import { InlineConfig } from 'vite';
2+
import { resolve as r } from './utils.mjs';
3+
import * as fs from 'fs-extra';
4+
import react from '@vitejs/plugin-react';
65

76
export const config: InlineConfig = {
87
envDir: r(),
@@ -12,11 +11,6 @@ export const config: InlineConfig = {
1211
events: 'rollup-plugin-node-polyfills/polyfills/events',
1312
},
1413
},
15-
define: {
16-
'__DEV__': __DEV__,
17-
'__NAME__': JSON.stringify(packageJson.name),
18-
'process.env.NODE_ENV': JSON.stringify(__DEV__ ? 'development' : 'production'),
19-
},
2014
esbuild: { loader: 'jsx', include: /src\/.*\.jsx?$/, exclude: [] },
2115
optimizeDeps: {
2216
esbuildOptions: {
@@ -34,4 +28,4 @@ export const config: InlineConfig = {
3428
},
3529
},
3630
plugins: [react()],
37-
}
31+
};

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /