From 17d87613cda943c7817fa2aebc1c0c289a9bcb9e Mon Sep 17 00:00:00 2001 From: Tmk Date: Mon, 23 Aug 2021 23:39:58 +0800 Subject: [PATCH 1/2] fix: __DEFINES__ is not defined is env --- packages/vite/LICENSE.md | 22 ---------------------- packages/vite/src/node/config.ts | 9 ++------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/packages/vite/LICENSE.md b/packages/vite/LICENSE.md index cb20fcd611f505..1f7bd05636d4ae 100644 --- a/packages/vite/LICENSE.md +++ b/packages/vite/LICENSE.md @@ -4592,28 +4592,6 @@ License: MIT By: Luke Edwards Repository: lukeed/sirv -> The MIT License (MIT) -> -> Copyright (c) Luke Edwards (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 diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index cd1d801fb8388d..5d04918ed48f42 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -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 From e4039af0fb3ae1934dddeaad73542e33da66592a Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Tue, 24 Aug 2021 01:28:39 +0800 Subject: [PATCH 2/2] Restore LICENSE.md --- packages/vite/LICENSE.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/packages/vite/LICENSE.md b/packages/vite/LICENSE.md index 1f7bd05636d4ae..cb20fcd611f505 100644 --- a/packages/vite/LICENSE.md +++ b/packages/vite/LICENSE.md @@ -4592,6 +4592,28 @@ License: MIT By: Luke Edwards Repository: lukeed/sirv +> The MIT License (MIT) +> +> Copyright (c) Luke Edwards (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