Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: __DEFINES__ is not defined is env
Browse files Browse the repository at this point in the history
tmkx committed Aug 23, 2021
1 parent 8048f90 commit 17d8761
Showing 2 changed files with 2 additions and 29 deletions.
22 changes: 0 additions & 22 deletions packages/vite/LICENSE.md
Original file line number Diff line number Diff line change
@@ -4592,28 +4592,6 @@ License: MIT
By: Luke Edwards
Repository: lukeed/sirv

> The MIT License (MIT)
>
> Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (https://lukeed.com)
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.
---------------------------------------

## slash
9 changes: 2 additions & 7 deletions packages/vite/src/node/config.ts
Original file line number Diff line number Diff line change
@@ -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,
@@ -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

0 comments on commit 17d8761

Please sign in to comment.