Skip to content

Commit

Permalink
chore: revert "feat: show warning to discourage putting process/globa…
Browse files Browse the repository at this point in the history
…l to `define` option (#14447)" (#14827)
  • Loading branch information
sapphi-red committed Oct 31, 2023
1 parent 86a5356 commit 0426910
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions packages/vite/src/node/config.ts
Expand Up @@ -483,21 +483,6 @@ export async function resolveConfig(
customLogger: config.customLogger,
})

let foundDiscouragedVariableName
if (
(foundDiscouragedVariableName = Object.keys(config.define ?? {}).find((k) =>
['process', 'global'].includes(k),
))
) {
logger.warn(
colors.yellow(
`Replacing ${colors.bold(
foundDiscouragedVariableName,
)} using the define option is discouraged. See https://vitejs.dev/config/shared-options.html#define for more details.`,
),
)
}

// resolve root
const resolvedRoot = normalizePath(
config.root ? path.resolve(config.root) : process.cwd(),
Expand Down

0 comments on commit 0426910

Please sign in to comment.