Commit c9e086d 1 parent 42ff9b3 commit c9e086d Copy full SHA for c9e086d
File tree 2 files changed +0
-25
lines changed
2 files changed +0
-25
lines changed Original file line number Diff line number Diff line change @@ -32,24 +32,6 @@ export function shouldExternalize(
32
32
return isExternal ( id , importer )
33
33
}
34
34
35
- const isConfiguredAsExternalCache = new WeakMap <
36
- Environment ,
37
- ( id : string , importer ?: string ) => boolean
38
- > ( )
39
-
40
- export function isConfiguredAsExternal (
41
- environment : Environment ,
42
- id : string ,
43
- importer ?: string ,
44
- ) : boolean {
45
- let isExternal = isConfiguredAsExternalCache . get ( environment )
46
- if ( ! isExternal ) {
47
- isExternal = createIsConfiguredAsExternal ( environment )
48
- isConfiguredAsExternalCache . set ( environment , isExternal )
49
- }
50
- return isExternal ( id , importer )
51
- }
52
-
53
35
export function createIsConfiguredAsExternal (
54
36
environment : PartialEnvironment ,
55
37
) : ( id : string , importer ?: string ) => boolean {
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import type {
7
7
ResolvedConfig ,
8
8
} from '..'
9
9
import type { Plugin } from '../plugin'
10
- import { isConfiguredAsExternal } from '../external'
11
10
import {
12
11
bareImportRE ,
13
12
isInNodeModules ,
@@ -22,7 +21,6 @@ import { tryOptimizedResolve } from './resolve'
22
21
*/
23
22
export function preAliasPlugin ( config : ResolvedConfig ) : Plugin {
24
23
const findPatterns = getAliasPatterns ( config . resolve . alias )
25
- const isBuild = config . command === 'build'
26
24
return {
27
25
name : 'vite:pre-alias' ,
28
26
async resolveId ( id , importer , options ) {
@@ -65,11 +63,6 @@ export function preAliasPlugin(config: ResolvedConfig): Plugin {
65
63
( isInNodeModules ( resolvedId ) ||
66
64
optimizeDeps . include ?. includes ( id ) ) &&
67
65
isOptimizable ( resolvedId , optimizeDeps ) &&
68
- ! (
69
- isBuild &&
70
- ssr &&
71
- isConfiguredAsExternal ( environment , id , importer )
72
- ) &&
73
66
( ! ssr || optimizeAliasReplacementForSSR ( resolvedId , optimizeDeps ) )
74
67
) {
75
68
// aliased dep has not yet been optimized
You can’t perform that action at this time.
0 commit comments