Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: __DEFINES__ is not defined is env (#4694)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
Co-authored-by: Shinigami <chrissi92@hotmail.de>
  • Loading branch information
3 people committed Aug 24, 2021
1 parent 66ef227 commit ff50c22
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/vite/src/node/config.ts
Expand Up @@ -21,12 +21,7 @@ import { ESBuildOptions } from './plugins/esbuild'
import dotenv from 'dotenv'
import dotenvExpand from 'dotenv-expand'
import { Alias, AliasOptions } from 'types/alias'
import {
CLIENT_PUBLIC_PATH,
CLIENT_ENTRY,
ENV_ENTRY,
DEFAULT_ASSETS_RE
} from './constants'
import { CLIENT_ENTRY, ENV_ENTRY, DEFAULT_ASSETS_RE } from './constants'
import {
InternalResolveOptions,
ResolveOptions,
Expand Down Expand Up @@ -307,7 +302,7 @@ export async function resolveConfig(

const clientAlias = [
{ find: /^[\/]?@vite\/env/, replacement: () => ENV_ENTRY },
{ find: CLIENT_PUBLIC_PATH, replacement: () => CLIENT_ENTRY }
{ find: /^[\/]?@vite\/client/, replacement: () => CLIENT_ENTRY }
]

// resolve alias with internal client alias
Expand Down

0 comments on commit ff50c22

Please sign in to comment.