@@ -21,7 +21,6 @@ use ecmascript::{
21
21
EcmascriptModuleAssetVc ,
22
22
} ;
23
23
use graph:: { aggregate, AggregatedGraphNodeContent , AggregatedGraphVc } ;
24
- use lazy_static:: lazy_static;
25
24
use module_options:: {
26
25
ModuleOptionsContextVc , ModuleOptionsVc , ModuleRuleEffect , ModuleType , ModuleTypeVc ,
27
26
} ;
@@ -36,16 +35,13 @@ use turbopack_core::{
36
35
compile_time_info:: CompileTimeInfoVc ,
37
36
context:: { AssetContext , AssetContextVc } ,
38
37
ident:: AssetIdentVc ,
39
- issue:: { unsupported_module :: UnsupportedModuleIssue , Issue , IssueVc } ,
38
+ issue:: { Issue , IssueVc } ,
40
39
plugin:: CustomModuleType ,
41
40
reference:: all_referenced_assets,
42
41
reference_type:: { EcmaScriptModulesReferenceSubType , ReferenceType } ,
43
42
resolve:: {
44
- options:: ResolveOptionsVc ,
45
- origin:: PlainResolveOriginVc ,
46
- parse:: { Request , RequestVc } ,
47
- pattern:: Pattern ,
48
- resolve, ModulePartVc , ResolveResultVc ,
43
+ options:: ResolveOptionsVc , origin:: PlainResolveOriginVc , parse:: RequestVc , resolve,
44
+ ModulePartVc , ResolveResultVc ,
49
45
} ,
50
46
} ;
51
47
@@ -71,12 +67,6 @@ use self::{
71
67
transition:: { TransitionVc , TransitionsByNameVc } ,
72
68
} ;
73
69
74
- lazy_static ! {
75
- static ref UNSUPPORTED_PACKAGES : HashSet <String > = [ "@vercel/og" . to_owned( ) ] . into( ) ;
76
- static ref UNSUPPORTED_PACKAGE_PATHS : HashSet <( String , String ) > =
77
- [ ( "@next/font" . to_owned( ) , "/local" . to_owned( ) ) ] . into( ) ;
78
- }
79
-
80
70
#[ turbo_tasks:: value]
81
71
struct ModuleIssue {
82
72
ident : AssetIdentVc ,
@@ -393,8 +383,6 @@ impl AssetContext for ModuleAssetContext {
393
383
resolve_options : ResolveOptionsVc ,
394
384
reference_type : Value < ReferenceType > ,
395
385
) -> Result < ResolveResultVc > {
396
- warn_on_unsupported_modules ( request, origin_path) . await ?;
397
-
398
386
let context_path = origin_path. parent ( ) . resolve ( ) . await ?;
399
387
400
388
let result = resolve ( context_path, request, resolve_options) ;
@@ -574,45 +562,6 @@ async fn top_references(list: ReferencesListVc) -> Result<ReferencesListVc> {
574
562
. into ( ) )
575
563
}
576
564
577
- async fn warn_on_unsupported_modules (
578
- request : RequestVc ,
579
- origin_path : FileSystemPathVc ,
580
- ) -> Result < ( ) > {
581
- if let Request :: Module {
582
- module,
583
- path,
584
- query : _,
585
- } = & * request. await ?
586
- {
587
- // Warn if the package is known not to be supported by Turbopack at the moment.
588
- if UNSUPPORTED_PACKAGES . contains ( module) {
589
- UnsupportedModuleIssue {
590
- context : origin_path,
591
- package : module. into ( ) ,
592
- package_path : None ,
593
- }
594
- . cell ( )
595
- . as_issue ( )
596
- . emit ( ) ;
597
- }
598
-
599
- if let Pattern :: Constant ( path) = path {
600
- if UNSUPPORTED_PACKAGE_PATHS . contains ( & ( module. to_string ( ) , path. to_owned ( ) ) ) {
601
- UnsupportedModuleIssue {
602
- context : origin_path,
603
- package : module. into ( ) ,
604
- package_path : Some ( path. to_owned ( ) ) ,
605
- }
606
- . cell ( )
607
- . as_issue ( )
608
- . emit ( ) ;
609
- }
610
- }
611
- }
612
-
613
- Ok ( ( ) )
614
- }
615
-
616
565
pub fn register ( ) {
617
566
turbo_tasks:: register ( ) ;
618
567
turbo_tasks_fs:: register ( ) ;
0 commit comments