@module-federation/enhanced 0.2.0-canary.5 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +169 -0
- package/dist/package.json +85 -0
- package/dist/src/declarations/plugins/container/AsyncDependenciesBlock.d.ts +57 -0
- package/dist/src/declarations/plugins/container/Dependency.d.ts +285 -0
- package/dist/src/declarations/plugins/container/Module.d.ts +138 -0
- package/dist/src/declarations/plugins/container/ModuleFactory.d.ts +33 -0
- package/dist/src/declarations/plugins/container/ObjectDeserializerContext.d.ts +4 -0
- package/dist/src/declarations/plugins/container/StaticExportsDependency.d.ts +28 -0
- package/dist/src/declarations/plugins/container/Template.d.ts +198 -0
- package/dist/src/declarations/plugins/container/WebpackError.d.ts +32 -0
- package/dist/src/declarations/plugins/container/WebpackOptions.d.ts +140 -0
- package/dist/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.ts +74 -0
- package/dist/src/declarations/plugins/sharing/ProvideSharedPlugin.d.ts +67 -0
- package/dist/src/declarations/plugins/sharing/SharePlugin.d.ts +78 -0
- package/dist/src/index.d.ts +14 -0
- package/dist/src/index.js +37 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lib/Constants.js +125 -0
- package/dist/src/lib/Constants.js.map +1 -0
- package/dist/src/lib/RuntimeGlobals.d.ts +0 -0
- package/{src → dist/src}/lib/RuntimeGlobals.js +144 -74
- package/dist/src/lib/RuntimeGlobals.js.map +1 -0
- package/{src → dist/src}/lib/container/AsyncBoundaryPlugin.d.ts +3 -4
- package/dist/src/lib/container/AsyncBoundaryPlugin.js +198 -0
- package/dist/src/lib/container/AsyncBoundaryPlugin.js.map +1 -0
- package/dist/src/lib/container/ContainerEntryDependency.d.ts +24 -0
- package/dist/src/lib/container/ContainerEntryDependency.js +39 -0
- package/dist/src/lib/container/ContainerEntryDependency.js.map +1 -0
- package/dist/src/lib/container/ContainerEntryModule.d.ts +75 -0
- package/dist/src/lib/container/ContainerEntryModule.js +240 -0
- package/dist/src/lib/container/ContainerEntryModule.js.map +1 -0
- package/dist/src/lib/container/ContainerEntryModuleFactory.d.ts +15 -0
- package/dist/src/lib/container/ContainerEntryModuleFactory.js +30 -0
- package/dist/src/lib/container/ContainerEntryModuleFactory.js.map +1 -0
- package/dist/src/lib/container/ContainerExposedDependency.d.ts +19 -0
- package/dist/src/lib/container/ContainerExposedDependency.js +49 -0
- package/dist/src/lib/container/ContainerExposedDependency.js.map +1 -0
- package/dist/src/lib/container/ContainerPlugin.d.ts +13 -0
- package/dist/src/lib/container/ContainerPlugin.js +188 -0
- package/dist/src/lib/container/ContainerPlugin.js.map +1 -0
- package/{src → dist/src}/lib/container/ContainerReferencePlugin.d.ts +3 -3
- package/dist/src/lib/container/ContainerReferencePlugin.js +102 -0
- package/dist/src/lib/container/ContainerReferencePlugin.js.map +1 -0
- package/dist/src/lib/container/FallbackDependency.d.ts +15 -0
- package/dist/src/lib/container/FallbackDependency.js +47 -0
- package/dist/src/lib/container/FallbackDependency.js.map +1 -0
- package/dist/src/lib/container/FallbackItemDependency.d.ts +3 -0
- package/dist/src/lib/container/FallbackItemDependency.js +26 -0
- package/dist/src/lib/container/FallbackItemDependency.js.map +1 -0
- package/dist/src/lib/container/FallbackModule.d.ts +54 -0
- package/dist/src/lib/container/FallbackModule.js +152 -0
- package/dist/src/lib/container/FallbackModule.js.map +1 -0
- package/dist/src/lib/container/FallbackModuleFactory.d.ts +11 -0
- package/dist/src/lib/container/FallbackModuleFactory.js +28 -0
- package/dist/src/lib/container/FallbackModuleFactory.js.map +1 -0
- package/dist/src/lib/container/HoistContainerReferencesPlugin.d.ts +14 -0
- package/dist/src/lib/container/HoistContainerReferencesPlugin.js +64 -0
- package/dist/src/lib/container/HoistContainerReferencesPlugin.js.map +1 -0
- package/dist/src/lib/container/ModuleFederationPlugin.d.ts +17 -0
- package/dist/src/lib/container/ModuleFederationPlugin.js +133 -0
- package/dist/src/lib/container/ModuleFederationPlugin.js.map +1 -0
- package/dist/src/lib/container/RemoteModule.d.ts +90 -0
- package/dist/src/lib/container/RemoteModule.js +148 -0
- package/dist/src/lib/container/RemoteModule.js.map +1 -0
- package/dist/src/lib/container/RemoteRuntimeModule.d.ts +12 -0
- package/dist/src/lib/container/RemoteRuntimeModule.js +101 -0
- package/dist/src/lib/container/RemoteRuntimeModule.js.map +1 -0
- package/{src → dist/src}/lib/container/RemoteToExternalDependency.d.ts +3 -9
- package/dist/src/lib/container/RemoteToExternalDependency.js +26 -0
- package/dist/src/lib/container/RemoteToExternalDependency.js.map +1 -0
- package/dist/src/lib/container/constant.d.ts +3 -0
- package/dist/src/lib/container/constant.js +12 -0
- package/dist/src/lib/container/constant.js.map +1 -0
- package/{src → dist/src}/lib/container/options.d.ts +12 -4
- package/{src → dist/src}/lib/container/options.js +32 -42
- package/dist/src/lib/container/options.js.map +1 -0
- package/dist/src/lib/container/runtime/FederationRuntimeModule.d.ts +13 -0
- package/dist/src/lib/container/runtime/FederationRuntimeModule.js +49 -0
- package/dist/src/lib/container/runtime/FederationRuntimeModule.js.map +1 -0
- package/dist/src/lib/container/runtime/FederationRuntimePlugin.d.ts +17 -0
- package/dist/src/lib/container/runtime/FederationRuntimePlugin.js +209 -0
- package/dist/src/lib/container/runtime/FederationRuntimePlugin.js.map +1 -0
- package/dist/src/lib/container/runtime/RemoteEntryPlugin.d.ts +8 -0
- package/dist/src/lib/container/runtime/RemoteEntryPlugin.js +32 -0
- package/dist/src/lib/container/runtime/RemoteEntryPlugin.js.map +1 -0
- package/dist/src/lib/container/runtime/getFederationGlobal.d.ts +5 -0
- package/dist/src/lib/container/runtime/getFederationGlobal.js +26 -0
- package/dist/src/lib/container/runtime/getFederationGlobal.js.map +1 -0
- package/dist/src/lib/container/runtime/utils.d.ts +16 -0
- package/dist/src/lib/container/runtime/utils.js +83 -0
- package/dist/src/lib/container/runtime/utils.js.map +1 -0
- package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.d.ts +3 -0
- package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js +26 -0
- package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js.map +1 -0
- package/dist/src/lib/sharing/ConsumeSharedModule.d.ts +99 -0
- package/dist/src/lib/sharing/ConsumeSharedModule.js +206 -0
- package/dist/src/lib/sharing/ConsumeSharedModule.js.map +1 -0
- package/dist/src/lib/sharing/ConsumeSharedPlugin.d.ts +30 -0
- package/dist/src/lib/sharing/ConsumeSharedPlugin.js +245 -0
- package/dist/src/lib/sharing/ConsumeSharedPlugin.js.map +1 -0
- package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.d.ts +31 -0
- package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js +124 -0
- package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +1 -0
- package/dist/src/lib/sharing/ProvideForSharedDependency.d.ts +3 -0
- package/dist/src/lib/sharing/ProvideForSharedDependency.js +27 -0
- package/dist/src/lib/sharing/ProvideForSharedDependency.js.map +1 -0
- package/dist/src/lib/sharing/ProvideSharedDependency.d.ts +36 -0
- package/dist/src/lib/sharing/ProvideSharedDependency.js +70 -0
- package/dist/src/lib/sharing/ProvideSharedDependency.js.map +1 -0
- package/dist/src/lib/sharing/ProvideSharedModule.d.ts +67 -0
- package/dist/src/lib/sharing/ProvideSharedModule.js +186 -0
- package/dist/src/lib/sharing/ProvideSharedModule.js.map +1 -0
- package/dist/src/lib/sharing/ProvideSharedModuleFactory.d.ts +18 -0
- package/dist/src/lib/sharing/ProvideSharedModuleFactory.js +30 -0
- package/dist/src/lib/sharing/ProvideSharedModuleFactory.js.map +1 -0
- package/dist/src/lib/sharing/ProvideSharedPlugin.d.ts +47 -0
- package/dist/src/lib/sharing/ProvideSharedPlugin.js +195 -0
- package/dist/src/lib/sharing/ProvideSharedPlugin.js.map +1 -0
- package/dist/src/lib/sharing/SharePlugin.d.ts +41 -0
- package/dist/src/lib/sharing/SharePlugin.js +79 -0
- package/dist/src/lib/sharing/SharePlugin.js.map +1 -0
- package/dist/src/lib/sharing/ShareRuntimeModule.d.ts +14 -0
- package/dist/src/lib/sharing/ShareRuntimeModule.js +102 -0
- package/dist/src/lib/sharing/ShareRuntimeModule.js.map +1 -0
- package/dist/src/lib/sharing/resolveMatchedConfigs.d.ts +12 -0
- package/dist/src/lib/sharing/resolveMatchedConfigs.js +66 -0
- package/dist/src/lib/sharing/resolveMatchedConfigs.js.map +1 -0
- package/dist/src/lib/sharing/utils.d.ts +37 -0
- package/{src → dist/src}/lib/sharing/utils.js +109 -81
- package/dist/src/lib/sharing/utils.js.map +1 -0
- package/dist/src/rspack.d.ts +1 -0
- package/dist/src/rspack.js +6 -0
- package/dist/src/rspack.js.map +1 -0
- package/{src → dist/src}/runtime/AddRuntimeRequirementToPromiseExternalPlugin.d.ts +1 -1
- package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js +19 -0
- package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js.map +1 -0
- package/dist/src/runtime.d.ts +1 -0
- package/dist/src/runtime.js +18 -0
- package/dist/src/runtime.js.map +1 -0
- package/dist/src/schemas/container/ContainerPlugin.check.d.ts +7 -0
- package/dist/src/schemas/container/ContainerPlugin.check.js +2318 -0
- package/dist/src/schemas/container/ContainerPlugin.check.js.map +1 -0
- package/dist/src/schemas/container/ContainerPlugin.d.ts +289 -0
- package/dist/src/schemas/container/ContainerPlugin.js +326 -0
- package/dist/src/schemas/container/ContainerPlugin.js.map +1 -0
- package/dist/src/schemas/container/ContainerReferencePlugin.check.d.ts +7 -0
- package/dist/src/schemas/container/ContainerReferencePlugin.check.js +939 -0
- package/dist/src/schemas/container/ContainerReferencePlugin.check.js.map +1 -0
- package/dist/src/schemas/container/ContainerReferencePlugin.d.ts +87 -0
- package/dist/src/schemas/container/ContainerReferencePlugin.js +132 -0
- package/dist/src/schemas/container/ContainerReferencePlugin.js.map +1 -0
- package/dist/src/schemas/container/ModuleFederationPlugin.check.d.ts +9 -0
- package/dist/src/schemas/container/ModuleFederationPlugin.check.js +4001 -0
- package/dist/src/schemas/container/ModuleFederationPlugin.check.js.map +1 -0
- package/{src → dist/src}/schemas/container/ModuleFederationPlugin.d.ts +197 -4
- package/{src → dist/src}/schemas/container/ModuleFederationPlugin.js +349 -177
- package/dist/src/schemas/container/ModuleFederationPlugin.js.map +1 -0
- package/{src/schemas/container/ModuleFederationPlugin.check.d.ts → dist/src/schemas/sharing/ProviderSharedPlugin.check.d.ts} +2 -2
- package/dist/src/schemas/sharing/ProviderSharedPlugin.check.js +434 -0
- package/dist/src/schemas/sharing/ProviderSharedPlugin.check.js.map +1 -0
- package/dist/src/schemas/sharing/ProviderSharedPlugin.d.ts +104 -0
- package/dist/src/schemas/sharing/ProviderSharedPlugin.js +119 -0
- package/dist/src/schemas/sharing/ProviderSharedPlugin.js.map +1 -0
- package/dist/src/types/runtime.d.ts +7 -0
- package/dist/src/types/runtime.js +3 -0
- package/dist/src/types/runtime.js.map +1 -0
- package/dist/src/webpack.d.ts +2 -0
- package/dist/src/webpack.js +9 -0
- package/dist/src/webpack.js.map +1 -0
- package/dist/src/wrapper/AsyncBoundaryPlugin.d.ts +8 -0
- package/dist/src/wrapper/AsyncBoundaryPlugin.js +19 -0
- package/dist/src/wrapper/AsyncBoundaryPlugin.js.map +1 -0
- package/dist/src/wrapper/ConsumeSharedPlugin.d.ts +8 -0
- package/dist/src/wrapper/ConsumeSharedPlugin.js +19 -0
- package/dist/src/wrapper/ConsumeSharedPlugin.js.map +1 -0
- package/dist/src/wrapper/ContainerPlugin.d.ts +8 -0
- package/dist/src/wrapper/ContainerPlugin.js +19 -0
- package/dist/src/wrapper/ContainerPlugin.js.map +1 -0
- package/dist/src/wrapper/ContainerReferencePlugin.d.ts +8 -0
- package/dist/src/wrapper/ContainerReferencePlugin.js +19 -0
- package/dist/src/wrapper/ContainerReferencePlugin.js.map +1 -0
- package/dist/src/wrapper/FederationRuntimePlugin.d.ts +9 -0
- package/dist/src/wrapper/FederationRuntimePlugin.js +22 -0
- package/dist/src/wrapper/FederationRuntimePlugin.js.map +1 -0
- package/dist/src/wrapper/HoistContainerReferencesPlugin.d.ts +7 -0
- package/dist/src/wrapper/HoistContainerReferencesPlugin.js +19 -0
- package/dist/src/wrapper/HoistContainerReferencesPlugin.js.map +1 -0
- package/dist/src/wrapper/ModuleFederationPlugin.d.ts +8 -0
- package/dist/src/wrapper/ModuleFederationPlugin.js +39 -0
- package/dist/src/wrapper/ModuleFederationPlugin.js.map +1 -0
- package/dist/src/wrapper/ProvideSharedPlugin.d.ts +8 -0
- package/dist/src/wrapper/ProvideSharedPlugin.js +19 -0
- package/dist/src/wrapper/ProvideSharedPlugin.js.map +1 -0
- package/dist/src/wrapper/SharePlugin.d.ts +8 -0
- package/dist/src/wrapper/SharePlugin.js +19 -0
- package/dist/src/wrapper/SharePlugin.js.map +1 -0
- package/package.json +75 -7
- package/global.d.js +0 -14
- package/global.d.js.map +0 -1
- package/pullts.d.ts +0 -1
- package/src/declarations/plugins/container/AsyncDependenciesBlock.d.js +0 -14
- package/src/declarations/plugins/container/AsyncDependenciesBlock.d.js.map +0 -1
- package/src/declarations/plugins/container/ContainerPlugin.d.js +0 -12
- package/src/declarations/plugins/container/ContainerPlugin.d.js.map +0 -1
- package/src/declarations/plugins/container/ContainerReferencePlugin.d.js +0 -12
- package/src/declarations/plugins/container/ContainerReferencePlugin.d.js.map +0 -1
- package/src/declarations/plugins/container/Dependency.d.js +0 -14
- package/src/declarations/plugins/container/Dependency.d.js.map +0 -1
- package/src/declarations/plugins/container/Module.d.js +0 -3
- package/src/declarations/plugins/container/Module.d.js.map +0 -1
- package/src/declarations/plugins/container/ModuleFactory.d.js +0 -3
- package/src/declarations/plugins/container/ModuleFactory.d.js.map +0 -1
- package/src/declarations/plugins/container/ModuleFederationPlugin.d.js +0 -12
- package/src/declarations/plugins/container/ModuleFederationPlugin.d.js.map +0 -1
- package/src/declarations/plugins/container/ObjectDeserializerContext.d.js +0 -6
- package/src/declarations/plugins/container/ObjectDeserializerContext.d.js.map +0 -1
- package/src/declarations/plugins/container/StaticExportsDependency.d.js +0 -14
- package/src/declarations/plugins/container/StaticExportsDependency.d.js.map +0 -1
- package/src/declarations/plugins/container/Template.d.js +0 -4
- package/src/declarations/plugins/container/Template.d.js.map +0 -1
- package/src/declarations/plugins/container/WebpackError.d.js +0 -3
- package/src/declarations/plugins/container/WebpackError.d.js.map +0 -1
- package/src/declarations/plugins/container/WebpackOptions.d.js +0 -6
- package/src/declarations/plugins/container/WebpackOptions.d.js.map +0 -1
- package/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.js +0 -12
- package/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.js.map +0 -1
- package/src/declarations/plugins/sharing/ProvideSharedPlugin.d.js +0 -12
- package/src/declarations/plugins/sharing/ProvideSharedPlugin.d.js.map +0 -1
- package/src/declarations/plugins/sharing/SharePlugin.d.js +0 -12
- package/src/declarations/plugins/sharing/SharePlugin.d.js.map +0 -1
- package/src/index.d.ts +0 -7
- package/src/index.js +0 -47
- package/src/index.js.map +0 -1
- package/src/lib/Constants.js +0 -103
- package/src/lib/Constants.js.map +0 -1
- package/src/lib/RuntimeGlobals.d.ts +0 -1
- package/src/lib/RuntimeGlobals.js.map +0 -1
- package/src/lib/container/AsyncBoundaryPlugin.js +0 -184
- package/src/lib/container/AsyncBoundaryPlugin.js.map +0 -1
- package/src/lib/container/ContainerEntryDependency.d.js +0 -4
- package/src/lib/container/ContainerEntryDependency.d.js.map +0 -1
- package/src/lib/container/ContainerEntryDependency.d.ts +0 -20
- package/src/lib/container/ContainerEntryDependency.js +0 -47
- package/src/lib/container/ContainerEntryDependency.js.map +0 -1
- package/src/lib/container/ContainerEntryModule.d.js +0 -14
- package/src/lib/container/ContainerEntryModule.d.js.map +0 -1
- package/src/lib/container/ContainerEntryModule.d.ts +0 -85
- package/src/lib/container/ContainerEntryModule.js +0 -281
- package/src/lib/container/ContainerEntryModule.js.map +0 -1
- package/src/lib/container/ContainerEntryModuleFactory.d.js +0 -4
- package/src/lib/container/ContainerEntryModuleFactory.d.js.map +0 -1
- package/src/lib/container/ContainerEntryModuleFactory.d.ts +0 -10
- package/src/lib/container/ContainerEntryModuleFactory.js +0 -37
- package/src/lib/container/ContainerEntryModuleFactory.js.map +0 -1
- package/src/lib/container/ContainerExposedDependency.d.js +0 -4
- package/src/lib/container/ContainerExposedDependency.d.js.map +0 -1
- package/src/lib/container/ContainerExposedDependency.d.ts +0 -26
- package/src/lib/container/ContainerExposedDependency.js +0 -57
- package/src/lib/container/ContainerExposedDependency.js.map +0 -1
- package/src/lib/container/ContainerPlugin.d.js +0 -4
- package/src/lib/container/ContainerPlugin.d.js.map +0 -1
- package/src/lib/container/ContainerPlugin.d.ts +0 -11
- package/src/lib/container/ContainerPlugin.js +0 -92
- package/src/lib/container/ContainerPlugin.js.map +0 -1
- package/src/lib/container/ContainerReferencePlugin.d.js +0 -4
- package/src/lib/container/ContainerReferencePlugin.d.js.map +0 -1
- package/src/lib/container/ContainerReferencePlugin.js +0 -141
- package/src/lib/container/ContainerReferencePlugin.js.map +0 -1
- package/src/lib/container/FallbackDependency.d.js +0 -14
- package/src/lib/container/FallbackDependency.d.js.map +0 -1
- package/src/lib/container/FallbackDependency.d.ts +0 -25
- package/src/lib/container/FallbackDependency.js +0 -59
- package/src/lib/container/FallbackDependency.js.map +0 -1
- package/src/lib/container/FallbackItemDependency.d.js +0 -4
- package/src/lib/container/FallbackItemDependency.d.js.map +0 -1
- package/src/lib/container/FallbackItemDependency.d.ts +0 -10
- package/src/lib/container/FallbackItemDependency.js +0 -37
- package/src/lib/container/FallbackItemDependency.js.map +0 -1
- package/src/lib/container/FallbackModule.d.js +0 -4
- package/src/lib/container/FallbackModule.d.js.map +0 -1
- package/src/lib/container/FallbackModule.d.ts +0 -73
- package/src/lib/container/FallbackModule.js +0 -153
- package/src/lib/container/FallbackModule.js.map +0 -1
- package/src/lib/container/FallbackModuleFactory.d.js +0 -4
- package/src/lib/container/FallbackModuleFactory.d.js.map +0 -1
- package/src/lib/container/FallbackModuleFactory.d.ts +0 -10
- package/src/lib/container/FallbackModuleFactory.js +0 -35
- package/src/lib/container/FallbackModuleFactory.js.map +0 -1
- package/src/lib/container/HoistContainerReferencesPlugin.d.ts +0 -19
- package/src/lib/container/HoistContainerReferencesPlugin.js +0 -78
- package/src/lib/container/HoistContainerReferencesPlugin.js.map +0 -1
- package/src/lib/container/ModuleFederationPlugin.d.js +0 -4
- package/src/lib/container/ModuleFederationPlugin.d.js.map +0 -1
- package/src/lib/container/ModuleFederationPlugin.d.ts +0 -16
- package/src/lib/container/ModuleFederationPlugin.js +0 -85
- package/src/lib/container/ModuleFederationPlugin.js.map +0 -1
- package/src/lib/container/ModuleFederationPluginTypes.d.js +0 -12
- package/src/lib/container/ModuleFederationPluginTypes.d.js.map +0 -1
- package/src/lib/container/RemoteModule.d.js +0 -13
- package/src/lib/container/RemoteModule.d.js.map +0 -1
- package/src/lib/container/RemoteModule.d.ts +0 -76
- package/src/lib/container/RemoteModule.js +0 -151
- package/src/lib/container/RemoteModule.js.map +0 -1
- package/src/lib/container/RemoteRuntimeModule.d.js +0 -13
- package/src/lib/container/RemoteRuntimeModule.d.js.map +0 -1
- package/src/lib/container/RemoteRuntimeModule.d.ts +0 -9
- package/src/lib/container/RemoteRuntimeModule.js +0 -124
- package/src/lib/container/RemoteRuntimeModule.js.map +0 -1
- package/src/lib/container/RemoteToExternalDependency.d.js +0 -19
- package/src/lib/container/RemoteToExternalDependency.d.js.map +0 -1
- package/src/lib/container/RemoteToExternalDependency.js +0 -37
- package/src/lib/container/RemoteToExternalDependency.js.map +0 -1
- package/src/lib/container/options.d.js +0 -6
- package/src/lib/container/options.d.js.map +0 -1
- package/src/lib/container/options.js.map +0 -1
- package/src/lib/inversion/ContainerInversionPlugin.d.ts +0 -1
- package/src/lib/inversion/ContainerInversionPlugin.js +0 -3
- package/src/lib/inversion/ContainerInversionPlugin.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedFallbackDependency.d.js +0 -4
- package/src/lib/sharing/ConsumeSharedFallbackDependency.d.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedFallbackDependency.d.ts +0 -10
- package/src/lib/sharing/ConsumeSharedFallbackDependency.js +0 -37
- package/src/lib/sharing/ConsumeSharedFallbackDependency.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedModule.d.js +0 -4
- package/src/lib/sharing/ConsumeSharedModule.d.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedModule.d.ts +0 -106
- package/src/lib/sharing/ConsumeSharedModule.js +0 -235
- package/src/lib/sharing/ConsumeSharedModule.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedPlugin.d.js +0 -4
- package/src/lib/sharing/ConsumeSharedPlugin.d.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedPlugin.d.ts +0 -8
- package/src/lib/sharing/ConsumeSharedPlugin.js +0 -274
- package/src/lib/sharing/ConsumeSharedPlugin.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedRuntimeModule.d.js +0 -4
- package/src/lib/sharing/ConsumeSharedRuntimeModule.d.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedRuntimeModule.d.ts +0 -13
- package/src/lib/sharing/ConsumeSharedRuntimeModule.js +0 -294
- package/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +0 -1
- package/src/lib/sharing/ProvideForSharedDependency.d.js +0 -4
- package/src/lib/sharing/ProvideForSharedDependency.d.js.map +0 -1
- package/src/lib/sharing/ProvideForSharedDependency.d.ts +0 -11
- package/src/lib/sharing/ProvideForSharedDependency.js +0 -38
- package/src/lib/sharing/ProvideForSharedDependency.js.map +0 -1
- package/src/lib/sharing/ProvideSharedDependency.d.js +0 -14
- package/src/lib/sharing/ProvideSharedDependency.d.js.map +0 -1
- package/src/lib/sharing/ProvideSharedDependency.d.ts +0 -32
- package/src/lib/sharing/ProvideSharedDependency.js +0 -69
- package/src/lib/sharing/ProvideSharedDependency.js.map +0 -1
- package/src/lib/sharing/ProvideSharedModule.d.js +0 -4
- package/src/lib/sharing/ProvideSharedModule.d.js.map +0 -1
- package/src/lib/sharing/ProvideSharedModule.d.ts +0 -79
- package/src/lib/sharing/ProvideSharedModule.js +0 -203
- package/src/lib/sharing/ProvideSharedModule.js.map +0 -1
- package/src/lib/sharing/ProvideSharedModuleFactory.d.js +0 -4
- package/src/lib/sharing/ProvideSharedModuleFactory.d.js.map +0 -1
- package/src/lib/sharing/ProvideSharedModuleFactory.d.ts +0 -11
- package/src/lib/sharing/ProvideSharedModuleFactory.js +0 -36
- package/src/lib/sharing/ProvideSharedModuleFactory.js.map +0 -1
- package/src/lib/sharing/ProvideSharedPlugin.d.js +0 -4
- package/src/lib/sharing/ProvideSharedPlugin.d.js.map +0 -1
- package/src/lib/sharing/ProvideSharedPlugin.d.ts +0 -34
- package/src/lib/sharing/ProvideSharedPlugin.js +0 -182
- package/src/lib/sharing/ProvideSharedPlugin.js.map +0 -1
- package/src/lib/sharing/SharePlugin.d.js +0 -4
- package/src/lib/sharing/SharePlugin.d.js.map +0 -1
- package/src/lib/sharing/SharePlugin.d.ts +0 -15
- package/src/lib/sharing/SharePlugin.js +0 -77
- package/src/lib/sharing/SharePlugin.js.map +0 -1
- package/src/lib/sharing/ShareRuntimeModule.d.js +0 -4
- package/src/lib/sharing/ShareRuntimeModule.d.js.map +0 -1
- package/src/lib/sharing/ShareRuntimeModule.d.ts +0 -9
- package/src/lib/sharing/ShareRuntimeModule.js +0 -161
- package/src/lib/sharing/ShareRuntimeModule.js.map +0 -1
- package/src/lib/sharing/resolveMatchedConfigs.d.js +0 -6
- package/src/lib/sharing/resolveMatchedConfigs.d.js.map +0 -1
- package/src/lib/sharing/resolveMatchedConfigs.d.ts +0 -8
- package/src/lib/sharing/resolveMatchedConfigs.js +0 -73
- package/src/lib/sharing/resolveMatchedConfigs.js.map +0 -1
- package/src/lib/sharing/utils.d.js +0 -6
- package/src/lib/sharing/utils.d.js.map +0 -1
- package/src/lib/sharing/utils.d.ts +0 -33
- package/src/lib/sharing/utils.js.map +0 -1
- package/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js +0 -34
- package/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js.map +0 -1
- package/src/runtime/ModuleInfoRuntimeModule.d.ts +0 -16
- package/src/runtime/ModuleInfoRuntimeModule.js +0 -88
- package/src/runtime/ModuleInfoRuntimeModule.js.map +0 -1
- package/src/runtime/ModuleInfoRuntimePlugin.d.ts +0 -5
- package/src/runtime/ModuleInfoRuntimePlugin.js +0 -29
- package/src/runtime/ModuleInfoRuntimePlugin.js.map +0 -1
- package/src/schemas/container/ModuleFederationPlugin.check.js +0 -2245
- package/src/schemas/container/ModuleFederationPlugin.check.js.map +0 -1
- package/src/schemas/container/ModuleFederationPlugin.js.map +0 -1
- /package/{src → dist/src}/lib/Constants.d.ts +0 -0
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
3
|
-
Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy
|
|
4
|
-
*/ "use strict";
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "default", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function() {
|
|
11
|
-
return _default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const _RuntimeGlobals = /*#__PURE__*/ _interop_require_wildcard(require("webpack/lib/RuntimeGlobals"));
|
|
15
|
-
const _createschemavalidation = /*#__PURE__*/ _interop_require_default(require("webpack/lib/util/create-schema-validation"));
|
|
16
|
-
const _FallbackDependency = /*#__PURE__*/ _interop_require_default(require("./FallbackDependency"));
|
|
17
|
-
const _FallbackItemDependency = /*#__PURE__*/ _interop_require_default(require("./FallbackItemDependency"));
|
|
18
|
-
const _FallbackModuleFactory = /*#__PURE__*/ _interop_require_default(require("./FallbackModuleFactory"));
|
|
19
|
-
const _RemoteModule = /*#__PURE__*/ _interop_require_default(require("./RemoteModule"));
|
|
20
|
-
const _RemoteRuntimeModule = /*#__PURE__*/ _interop_require_default(require("./RemoteRuntimeModule"));
|
|
21
|
-
const _RemoteToExternalDependency = /*#__PURE__*/ _interop_require_default(require("./RemoteToExternalDependency"));
|
|
22
|
-
const _options = require("./options");
|
|
23
|
-
const _ExternalsPlugin = /*#__PURE__*/ _interop_require_default(require("webpack/lib/ExternalsPlugin"));
|
|
24
|
-
function _interop_require_default(obj) {
|
|
25
|
-
return obj && obj.__esModule ? obj : {
|
|
26
|
-
default: obj
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
30
|
-
if (typeof WeakMap !== "function") return null;
|
|
31
|
-
var cacheBabelInterop = new WeakMap();
|
|
32
|
-
var cacheNodeInterop = new WeakMap();
|
|
33
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
34
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
35
|
-
})(nodeInterop);
|
|
36
|
-
}
|
|
37
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
38
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
39
|
-
return obj;
|
|
40
|
-
}
|
|
41
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
42
|
-
return {
|
|
43
|
-
default: obj
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
47
|
-
if (cache && cache.has(obj)) {
|
|
48
|
-
return cache.get(obj);
|
|
49
|
-
}
|
|
50
|
-
var newObj = {
|
|
51
|
-
__proto__: null
|
|
52
|
-
};
|
|
53
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
54
|
-
for(var key in obj){
|
|
55
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
56
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
57
|
-
if (desc && (desc.get || desc.set)) {
|
|
58
|
-
Object.defineProperty(newObj, key, desc);
|
|
59
|
-
} else {
|
|
60
|
-
newObj[key] = obj[key];
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
newObj.default = obj;
|
|
65
|
-
if (cache) {
|
|
66
|
-
cache.set(obj, newObj);
|
|
67
|
-
}
|
|
68
|
-
return newObj;
|
|
69
|
-
}
|
|
70
|
-
const validate = (0, _createschemavalidation.default)(//eslint-disable-next-line
|
|
71
|
-
require('webpack/schemas/plugins/container/ContainerReferencePlugin.check.js'), ()=>require('webpack/schemas/plugins/container/ContainerReferencePlugin.json'), {
|
|
72
|
-
name: 'Container Reference Plugin',
|
|
73
|
-
baseDataPath: 'options'
|
|
74
|
-
});
|
|
75
|
-
const slashCode = '/'.charCodeAt(0);
|
|
76
|
-
let ContainerReferencePlugin = class ContainerReferencePlugin {
|
|
77
|
-
/**
|
|
78
|
-
* Apply the plugin
|
|
79
|
-
* @param {Compiler} compiler the compiler instance
|
|
80
|
-
* @returns {void}
|
|
81
|
-
*/ apply(compiler) {
|
|
82
|
-
const { _remotes: remotes, _remoteType: remoteType } = this;
|
|
83
|
-
/** @type {Record<string, string>} */ const remoteExternals = {};
|
|
84
|
-
for (const [key, config] of remotes){
|
|
85
|
-
let i = 0;
|
|
86
|
-
for (const external of config.external){
|
|
87
|
-
if (typeof external === 'string' && external.startsWith('internal ')) {
|
|
88
|
-
continue;
|
|
89
|
-
}
|
|
90
|
-
remoteExternals[`webpack/container/reference/${key}${i ? `/fallback-${i}` : ''}`] = external;
|
|
91
|
-
i++;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
const Externals = compiler.webpack.ExternalsPlugin || _ExternalsPlugin.default;
|
|
95
|
-
//@ts-ignore
|
|
96
|
-
new Externals(remoteType, remoteExternals).apply(compiler);
|
|
97
|
-
compiler.hooks.compilation.tap('ContainerReferencePlugin', (compilation, { normalModuleFactory })=>{
|
|
98
|
-
compilation.dependencyFactories.set(_RemoteToExternalDependency.default, normalModuleFactory);
|
|
99
|
-
compilation.dependencyFactories.set(_FallbackItemDependency.default, normalModuleFactory);
|
|
100
|
-
compilation.dependencyFactories.set(_FallbackDependency.default, new _FallbackModuleFactory.default());
|
|
101
|
-
normalModuleFactory.hooks.factorize.tap('ContainerReferencePlugin', //@ts-ignore
|
|
102
|
-
(data)=>{
|
|
103
|
-
if (!data.request.includes('!')) {
|
|
104
|
-
for (const [key, config] of remotes){
|
|
105
|
-
if (data.request.startsWith(`${key}`) && (data.request.length === key.length || data.request.charCodeAt(key.length) === slashCode)) {
|
|
106
|
-
return new _RemoteModule.default(data.request, //@ts-ignore
|
|
107
|
-
config.external.map((external, i)=>external.startsWith('internal ') ? external.slice(9) : `webpack/container/reference/${key}${i ? `/fallback-${i}` : ''}`), `.${data.request.slice(key.length)}`, //@ts-ignore
|
|
108
|
-
config.shareScope);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
compilation.hooks.runtimeRequirementInTree.for(_RuntimeGlobals.ensureChunkHandlers).tap('ContainerReferencePlugin', (chunk, set)=>{
|
|
114
|
-
set.add(_RuntimeGlobals.module);
|
|
115
|
-
set.add(_RuntimeGlobals.moduleFactoriesAddOnly);
|
|
116
|
-
set.add(_RuntimeGlobals.hasOwnProperty);
|
|
117
|
-
set.add(_RuntimeGlobals.initializeSharing);
|
|
118
|
-
set.add(_RuntimeGlobals.shareScopeMap);
|
|
119
|
-
compilation.addRuntimeModule(chunk, new _RemoteRuntimeModule.default());
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
constructor(options){
|
|
124
|
-
validate(options);
|
|
125
|
-
this._remoteType = options.remoteType;
|
|
126
|
-
this._remotes = (0, _options.parseOptions)(options.remotes, (item)=>({
|
|
127
|
-
external: Array.isArray(item) ? item : [
|
|
128
|
-
item
|
|
129
|
-
],
|
|
130
|
-
shareScope: options.shareScope || 'default'
|
|
131
|
-
}), (item)=>({
|
|
132
|
-
external: Array.isArray(item.external) ? item.external : [
|
|
133
|
-
item.external
|
|
134
|
-
],
|
|
135
|
-
shareScope: item.shareScope || options.shareScope || 'default'
|
|
136
|
-
}));
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
const _default = ContainerReferencePlugin;
|
|
140
|
-
|
|
141
|
-
//# sourceMappingURL=ContainerReferencePlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/ContainerReferencePlugin.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy\n*/\n\nimport type Compiler from 'webpack/lib/Compiler';\nimport * as RuntimeGlobals from 'webpack/lib/RuntimeGlobals';\nimport createSchemaValidation from 'webpack/lib/util/create-schema-validation';\nimport FallbackDependency from './FallbackDependency';\nimport FallbackItemDependency from './FallbackItemDependency';\nimport FallbackModuleFactory from './FallbackModuleFactory';\nimport RemoteModule from './RemoteModule';\nimport RemoteRuntimeModule from './RemoteRuntimeModule';\nimport RemoteToExternalDependency from './RemoteToExternalDependency';\nimport { parseOptions } from './options';\nimport ExternalsPlugin from 'webpack/lib/ExternalsPlugin';\nimport type Compilation from 'webpack/lib/Compilation';\nimport type { ResolveData } from 'webpack/lib/NormalModuleFactory';\nimport NormalModuleFactory from 'webpack/lib/NormalModuleFactory';\nimport {\n ExternalsType,\n ContainerReferencePluginOptions,\n RemotesConfig,\n} from '../../declarations/plugins/container/ContainerReferencePlugin';\n\nconst validate = createSchemaValidation(\n //eslint-disable-next-line\n require('webpack/schemas/plugins/container/ContainerReferencePlugin.check.js'),\n () =>\n require('webpack/schemas/plugins/container/ContainerReferencePlugin.json'),\n {\n name: 'Container Reference Plugin',\n baseDataPath: 'options',\n },\n);\n\nconst slashCode = '/'.charCodeAt(0);\n\nclass ContainerReferencePlugin {\n private _remoteType: ExternalsType;\n private _remotes: [string, RemotesConfig][];\n\n constructor(options: ContainerReferencePluginOptions) {\n validate(options);\n\n this._remoteType = options.remoteType;\n this._remotes = parseOptions(\n options.remotes,\n (item) => ({\n external: Array.isArray(item) ? item : [item],\n shareScope: options.shareScope || 'default',\n }),\n (item) => ({\n external: Array.isArray(item.external)\n ? item.external\n : [item.external],\n shareScope: item.shareScope || options.shareScope || 'default',\n }),\n );\n }\n\n /**\n * Apply the plugin\n * @param {Compiler} compiler the compiler instance\n * @returns {void}\n */\n apply(compiler: Compiler): void {\n const { _remotes: remotes, _remoteType: remoteType } = this;\n\n /** @type {Record<string, string>} */\n const remoteExternals: Record<string, string> = {};\n\n for (const [key, config] of remotes) {\n let i = 0;\n for (const external of config.external) {\n if (typeof external === 'string' && external.startsWith('internal ')) {\n continue;\n }\n remoteExternals[\n `webpack/container/reference/${key}${i ? `/fallback-${i}` : ''}`\n ] = external;\n i++;\n }\n }\n const Externals = compiler.webpack.ExternalsPlugin || ExternalsPlugin;\n //@ts-ignore\n new Externals(remoteType, remoteExternals).apply(compiler);\n\n compiler.hooks.compilation.tap(\n 'ContainerReferencePlugin',\n (\n compilation: Compilation,\n { normalModuleFactory }: { normalModuleFactory: NormalModuleFactory },\n ) => {\n compilation.dependencyFactories.set(\n RemoteToExternalDependency,\n normalModuleFactory,\n );\n\n compilation.dependencyFactories.set(\n FallbackItemDependency,\n normalModuleFactory,\n );\n\n compilation.dependencyFactories.set(\n FallbackDependency,\n new FallbackModuleFactory(),\n );\n\n normalModuleFactory.hooks.factorize.tap(\n 'ContainerReferencePlugin',\n //@ts-ignore\n (data: ResolveData): Module => {\n if (!data.request.includes('!')) {\n for (const [key, config] of remotes) {\n if (\n data.request.startsWith(`${key}`) &&\n (data.request.length === key.length ||\n data.request.charCodeAt(key.length) === slashCode)\n ) {\n return new RemoteModule(\n data.request,\n //@ts-ignore\n config.external.map((external: any, i: any) =>\n external.startsWith('internal ')\n ? external.slice(9)\n : `webpack/container/reference/${key}${\n i ? `/fallback-${i}` : ''\n }`,\n ),\n `.${data.request.slice(key.length)}`,\n //@ts-ignore\n config.shareScope,\n );\n }\n }\n }\n },\n );\n\n compilation.hooks.runtimeRequirementInTree\n .for(RuntimeGlobals.ensureChunkHandlers)\n .tap('ContainerReferencePlugin', (chunk, set) => {\n set.add(RuntimeGlobals.module);\n set.add(RuntimeGlobals.moduleFactoriesAddOnly);\n set.add(RuntimeGlobals.hasOwnProperty);\n set.add(RuntimeGlobals.initializeSharing);\n set.add(RuntimeGlobals.shareScopeMap);\n compilation.addRuntimeModule(chunk, new RemoteRuntimeModule());\n });\n },\n );\n }\n}\n\nexport default ContainerReferencePlugin;\n"],"names":["validate","createSchemaValidation","require","name","baseDataPath","slashCode","charCodeAt","ContainerReferencePlugin","apply","compiler","_remotes","remotes","_remoteType","remoteType","remoteExternals","key","config","i","external","startsWith","Externals","webpack","ExternalsPlugin","hooks","compilation","tap","normalModuleFactory","dependencyFactories","set","RemoteToExternalDependency","FallbackItemDependency","FallbackDependency","FallbackModuleFactory","factorize","data","request","includes","length","RemoteModule","map","slice","shareScope","runtimeRequirementInTree","for","RuntimeGlobals","ensureChunkHandlers","chunk","add","module","moduleFactoriesAddOnly","hasOwnProperty","initializeSharing","shareScopeMap","addRuntimeModule","RemoteRuntimeModule","constructor","options","parseOptions","item","Array","isArray"],"mappings":"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"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "FallbackDependency", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return FallbackDependency;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
let FallbackDependency = class FallbackDependency extends Dependency {
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
//# sourceMappingURL=FallbackDependency.d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackDependency.d.ts"],"sourcesContent":["export class FallbackDependency extends Dependency {\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {FallbackDependency} deserialize fallback dependency\n */\n static deserialize(context: ObjectDeserializerContext): FallbackDependency;\n /**\n * @param {string[]} requests requests\n */\n constructor(requests: string[]);\n requests: string[];\n}\ndeclare namespace FallbackDependency {\n export { ObjectDeserializerContext, ObjectSerializerContext };\n}\n"],"names":["FallbackDependency","Dependency"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,IAAA,AAAMA,qBAAN,MAAMA,2BAA2BC;AAWxC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ObjectDeserializerContext, ObjectSerializerContext } from 'webpack/lib/Dependency';
|
|
2
|
-
import Dependency from 'webpack/lib/Dependency';
|
|
3
|
-
declare class FallbackDependency extends Dependency {
|
|
4
|
-
requests: string[];
|
|
5
|
-
/**
|
|
6
|
-
* @param {string[]} requests requests
|
|
7
|
-
*/
|
|
8
|
-
constructor(requests: string[]);
|
|
9
|
-
/**
|
|
10
|
-
* @returns {string | null} an identifier to merge equal requests
|
|
11
|
-
*/
|
|
12
|
-
getResourceIdentifier(): string | null;
|
|
13
|
-
get type(): string;
|
|
14
|
-
get category(): string;
|
|
15
|
-
/**
|
|
16
|
-
* @param {ObjectSerializerContext} context context
|
|
17
|
-
*/
|
|
18
|
-
serialize(context: ObjectSerializerContext): void;
|
|
19
|
-
/**
|
|
20
|
-
* @param {ObjectDeserializerContext} context context
|
|
21
|
-
* @returns {FallbackDependency} deserialize fallback dependency
|
|
22
|
-
*/
|
|
23
|
-
static deserialize(context: ObjectDeserializerContext): FallbackDependency;
|
|
24
|
-
}
|
|
25
|
-
export default FallbackDependency;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
3
|
-
Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy
|
|
4
|
-
*/ 'use strict';
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "default", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function() {
|
|
11
|
-
return _default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const _Dependency = /*#__PURE__*/ _interop_require_default(require("webpack/lib/Dependency"));
|
|
15
|
-
const _makeSerializable = /*#__PURE__*/ _interop_require_default(require("webpack/lib/util/makeSerializable"));
|
|
16
|
-
function _interop_require_default(obj) {
|
|
17
|
-
return obj && obj.__esModule ? obj : {
|
|
18
|
-
default: obj
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
let FallbackDependency = class FallbackDependency extends _Dependency.default {
|
|
22
|
-
/**
|
|
23
|
-
* @returns {string | null} an identifier to merge equal requests
|
|
24
|
-
*/ getResourceIdentifier() {
|
|
25
|
-
return `fallback ${this.requests.join(' ')}`;
|
|
26
|
-
}
|
|
27
|
-
get type() {
|
|
28
|
-
return 'fallback';
|
|
29
|
-
}
|
|
30
|
-
get category() {
|
|
31
|
-
return 'esm';
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* @param {ObjectSerializerContext} context context
|
|
35
|
-
*/ serialize(context) {
|
|
36
|
-
const { write } = context;
|
|
37
|
-
write(this.requests);
|
|
38
|
-
super.serialize(context);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @param {ObjectDeserializerContext} context context
|
|
42
|
-
* @returns {FallbackDependency} deserialize fallback dependency
|
|
43
|
-
*/ static deserialize(context) {
|
|
44
|
-
const { read } = context;
|
|
45
|
-
const obj = new FallbackDependency(read());
|
|
46
|
-
obj.deserialize(context);
|
|
47
|
-
return obj;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* @param {string[]} requests requests
|
|
51
|
-
*/ constructor(requests){
|
|
52
|
-
super();
|
|
53
|
-
this.requests = requests;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
(0, _makeSerializable.default)(FallbackDependency, 'enhanced/lib/container/FallbackDependency');
|
|
57
|
-
const _default = FallbackDependency;
|
|
58
|
-
|
|
59
|
-
//# sourceMappingURL=FallbackDependency.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackDependency.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy\n*/\n\n'use strict';\n\nimport type {\n ObjectDeserializerContext,\n ObjectSerializerContext,\n} from 'webpack/lib/Dependency';\nimport Dependency from 'webpack/lib/Dependency';\nimport makeSerializable from 'webpack/lib/util/makeSerializable';\n\nclass FallbackDependency extends Dependency {\n requests: string[];\n\n /**\n * @param {string[]} requests requests\n */\n constructor(requests: string[]) {\n super();\n this.requests = requests;\n }\n\n /**\n * @returns {string | null} an identifier to merge equal requests\n */\n override getResourceIdentifier(): string | null {\n return `fallback ${this.requests.join(' ')}`;\n }\n\n override get type(): string {\n return 'fallback';\n }\n\n override get category(): string {\n return 'esm';\n }\n\n /**\n * @param {ObjectSerializerContext} context context\n */\n override serialize(context: ObjectSerializerContext): void {\n const { write } = context;\n write(this.requests);\n super.serialize(context);\n }\n\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {FallbackDependency} deserialize fallback dependency\n */\n static deserialize(context: ObjectDeserializerContext): FallbackDependency {\n const { read } = context;\n const obj = new FallbackDependency(read());\n obj.deserialize(context);\n return obj;\n }\n}\n\nmakeSerializable(\n FallbackDependency,\n 'enhanced/lib/container/FallbackDependency',\n);\n\nexport default FallbackDependency;\n"],"names":["FallbackDependency","Dependency","getResourceIdentifier","requests","join","type","category","serialize","context","write","deserialize","read","obj","constructor","makeSerializable"],"mappings":"AAAA;;;AAGA,GAEA;;;;+BA6DA;;;eAAA;;;mEAvDuB;yEACM;;;;;;AAE7B,IAAA,AAAMA,qBAAN,MAAMA,2BAA2BC,mBAAU;IAWzC;;GAEC,GACD,AAASC,wBAAuC;QAC9C,OAAO,CAAC,SAAS,EAAE,IAAI,CAACC,QAAQ,CAACC,IAAI,CAAC,KAAK,CAAC;IAC9C;IAEA,IAAaC,OAAe;QAC1B,OAAO;IACT;IAEA,IAAaC,WAAmB;QAC9B,OAAO;IACT;IAEA;;GAEC,GACD,AAASC,UAAUC,OAAgC,EAAQ;QACzD,MAAM,EAAEC,KAAK,EAAE,GAAGD;QAClBC,MAAM,IAAI,CAACN,QAAQ;QACnB,KAAK,CAACI,UAAUC;IAClB;IAEA;;;GAGC,GACD,OAAOE,YAAYF,OAAkC,EAAsB;QACzE,MAAM,EAAEG,IAAI,EAAE,GAAGH;QACjB,MAAMI,MAAM,IAAIZ,mBAAmBW;QACnCC,IAAIF,WAAW,CAACF;QAChB,OAAOI;IACT;IAzCA;;GAEC,GACDC,YAAYV,QAAkB,CAAE;QAC9B,KAAK;QACL,IAAI,CAACA,QAAQ,GAAGA;IAClB;AAoCF;AAEAW,IAAAA,yBAAgB,EACdd,oBACA;MAGF,WAAeA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackItemDependency.d.ts"],"sourcesContent":["export = FallbackItemDependency;\ndeclare class FallbackItemDependency extends ModuleDependency {}\nimport ModuleDependency = require('webpack/lib/dependencies/ModuleDependency');\n"],"names":["FallbackItemDependency"],"mappings":";iBAASA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import ModuleDependency from 'webpack/lib/dependencies/ModuleDependency';
|
|
2
|
-
declare class FallbackItemDependency extends ModuleDependency {
|
|
3
|
-
/**
|
|
4
|
-
* @param {string} request request
|
|
5
|
-
*/
|
|
6
|
-
constructor(request: string);
|
|
7
|
-
get type(): string;
|
|
8
|
-
get category(): string;
|
|
9
|
-
}
|
|
10
|
-
export default FallbackItemDependency;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
3
|
-
Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy
|
|
4
|
-
*/ "use strict";
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "default", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function() {
|
|
11
|
-
return _default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const _ModuleDependency = /*#__PURE__*/ _interop_require_default(require("webpack/lib/dependencies/ModuleDependency"));
|
|
15
|
-
const _makeSerializable = /*#__PURE__*/ _interop_require_default(require("webpack/lib/util/makeSerializable"));
|
|
16
|
-
function _interop_require_default(obj) {
|
|
17
|
-
return obj && obj.__esModule ? obj : {
|
|
18
|
-
default: obj
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
let FallbackItemDependency = class FallbackItemDependency extends _ModuleDependency.default {
|
|
22
|
-
get type() {
|
|
23
|
-
return 'fallback item';
|
|
24
|
-
}
|
|
25
|
-
get category() {
|
|
26
|
-
return 'esm';
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @param {string} request request
|
|
30
|
-
*/ constructor(request){
|
|
31
|
-
super(request);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
(0, _makeSerializable.default)(FallbackItemDependency, 'enhanced/lib/container/FallbackItemDependency');
|
|
35
|
-
const _default = FallbackItemDependency;
|
|
36
|
-
|
|
37
|
-
//# sourceMappingURL=FallbackItemDependency.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackItemDependency.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy\n*/\nimport ModuleDependency from 'webpack/lib/dependencies/ModuleDependency';\nimport makeSerializable from 'webpack/lib/util/makeSerializable';\n\nclass FallbackItemDependency extends ModuleDependency {\n /**\n * @param {string} request request\n */\n constructor(request: string) {\n super(request);\n }\n\n override get type(): string {\n return 'fallback item';\n }\n\n override get category(): string {\n return 'esm';\n }\n}\n\nmakeSerializable(\n FallbackItemDependency,\n 'enhanced/lib/container/FallbackItemDependency',\n);\n\nexport default FallbackItemDependency;\n"],"names":["FallbackItemDependency","ModuleDependency","type","category","constructor","request","makeSerializable"],"mappings":"AAAA;;;AAGA;;;;+BA0BA;;;eAAA;;;yEAzB6B;yEACA;;;;;;AAE7B,IAAA,AAAMA,yBAAN,MAAMA,+BAA+BC,yBAAgB;IAQnD,IAAaC,OAAe;QAC1B,OAAO;IACT;IAEA,IAAaC,WAAmB;QAC9B,OAAO;IACT;IAbA;;GAEC,GACDC,YAAYC,OAAe,CAAE;QAC3B,KAAK,CAACA;IACR;AASF;AAEAC,IAAAA,yBAAgB,EACdN,wBACA;MAGF,WAAeA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackModule.d.ts"],"sourcesContent":["export = FallbackModule;\ndeclare class FallbackModule extends Module {\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {FallbackModule} deserialized fallback module\n */\n static deserialize(context: ObjectDeserializerContext): FallbackModule;\n /**\n * @param {string[]} requests list of requests to choose one\n */\n constructor(requests: string[]);\n requests: string[];\n _identifier: string;\n}\ndeclare namespace FallbackModule {\n export {\n WebpackOptions,\n Chunk,\n ChunkGraph,\n ChunkGroup,\n Compilation,\n CodeGenerationContext,\n CodeGenerationResult,\n LibIdentOptions,\n NeedBuildContext,\n RequestShortener,\n ResolverWithOptions,\n WebpackError,\n ObjectDeserializerContext,\n ObjectSerializerContext,\n Hash,\n InputFileSystem,\n };\n}\nimport Module = require('webpack/lib/Module');\ntype ObjectDeserializerContext =\n import('webpack/lib/serialization/ObjectMiddleware').ObjectDeserializerContext;\ntype WebpackOptions = any;\ntype Chunk = import('webpack/lib/Chunk');\ntype ChunkGraph = import('webpack/lib/ChunkGraph');\ntype ChunkGroup = import('webpack/lib/ChunkGroup');\ntype Compilation = import('webpack/lib/Compilation');\ntype CodeGenerationContext = import('webpack/lib/Module').CodeGenerationContext;\ntype CodeGenerationResult = import('webpack/lib/Module').CodeGenerationResult;\ntype LibIdentOptions = import('webpack/lib/Module').LibIdentOptions;\ntype NeedBuildContext = import('webpack/lib/Module').NeedBuildContext;\ntype RequestShortener = import('webpack/lib/RequestShortener');\ntype ResolverWithOptions =\n import('webpack/lib/ResolverFactory').ResolverWithOptions;\ntype WebpackError = import('webpack/lib/WebpackError');\ntype ObjectSerializerContext =\n import('webpack/lib/serialization/ObjectMiddleware').ObjectSerializerContext;\ntype Hash = import('webpack/lib/util/Hash');\ntype InputFileSystem = import('webpack/lib/util/fs').InputFileSystem;\n"],"names":["FallbackModule"],"mappings":";iBAASA"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import type { RequestShortener, LibIdentOptions, CodeGenerationContext, CodeGenerationResult, NeedBuildContext, WebpackError, ResolverWithOptions, InputFileSystem, Compilation, WebpackOptions, ObjectDeserializerContext, ObjectSerializerContext } from 'webpack/lib/Module';
|
|
2
|
-
import Module from 'webpack/lib/Module';
|
|
3
|
-
import type ChunkGraph from 'webpack/lib/ChunkGraph';
|
|
4
|
-
import Chunk from 'webpack/lib/Chunk';
|
|
5
|
-
declare class FallbackModule extends Module {
|
|
6
|
-
private requests;
|
|
7
|
-
private _identifier;
|
|
8
|
-
/**
|
|
9
|
-
* @param {string[]} requests list of requests to choose one
|
|
10
|
-
*/
|
|
11
|
-
constructor(requests: string[]);
|
|
12
|
-
/**
|
|
13
|
-
* @returns {string} a unique identifier of the module
|
|
14
|
-
*/
|
|
15
|
-
identifier(): string;
|
|
16
|
-
/**
|
|
17
|
-
* @param {RequestShortener} requestShortener the request shortener
|
|
18
|
-
* @returns {string} a user readable identifier of the module
|
|
19
|
-
*/
|
|
20
|
-
readableIdentifier(requestShortener: RequestShortener): string;
|
|
21
|
-
/**
|
|
22
|
-
* @param {LibIdentOptions} options options
|
|
23
|
-
* @returns {string | null} an identifier for library inclusion
|
|
24
|
-
*/
|
|
25
|
-
libIdent(options: LibIdentOptions): string | null;
|
|
26
|
-
/**
|
|
27
|
-
* @param {Chunk} chunk the chunk which condition should be checked
|
|
28
|
-
* @param {Compilation} compilation the compilation
|
|
29
|
-
* @returns {boolean} true, if the chunk is ok for the module
|
|
30
|
-
*/
|
|
31
|
-
chunkCondition(chunk: Chunk, { chunkGraph }: {
|
|
32
|
-
chunkGraph: ChunkGraph;
|
|
33
|
-
}): boolean;
|
|
34
|
-
/**
|
|
35
|
-
* @param {NeedBuildContext} context context info
|
|
36
|
-
* @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild
|
|
37
|
-
* @returns {void}
|
|
38
|
-
*/
|
|
39
|
-
needBuild(context: NeedBuildContext, callback: (error: WebpackError | null, result?: boolean) => void): void;
|
|
40
|
-
/**
|
|
41
|
-
* @param {WebpackOptions} options webpack options
|
|
42
|
-
* @param {Compilation} compilation the compilation
|
|
43
|
-
* @param {ResolverWithOptions} resolver the resolver
|
|
44
|
-
* @param {InputFileSystem} fs the file system
|
|
45
|
-
* @param {function(WebpackError=): void} callback callback function
|
|
46
|
-
* @returns {void}
|
|
47
|
-
*/
|
|
48
|
-
build(options: WebpackOptions, compilation: Compilation, resolver: ResolverWithOptions, fs: InputFileSystem, callback: (error?: WebpackError) => void): void;
|
|
49
|
-
/**
|
|
50
|
-
* @param {string=} type the source type for which the size should be estimated
|
|
51
|
-
* @returns {number} the estimated size of the module (must be non-zero)
|
|
52
|
-
*/
|
|
53
|
-
size(type?: string): number;
|
|
54
|
-
/**
|
|
55
|
-
* @returns {Set<string>} types available (do not mutate)
|
|
56
|
-
*/
|
|
57
|
-
getSourceTypes(): Set<string>;
|
|
58
|
-
/**
|
|
59
|
-
* @param {CodeGenerationContext} context context for code generation
|
|
60
|
-
* @returns {CodeGenerationResult} result
|
|
61
|
-
*/
|
|
62
|
-
codeGeneration({ runtimeTemplate, moduleGraph, chunkGraph, }: CodeGenerationContext): CodeGenerationResult;
|
|
63
|
-
/**
|
|
64
|
-
* @param {ObjectSerializerContext} context context
|
|
65
|
-
*/
|
|
66
|
-
serialize(context: ObjectSerializerContext): void;
|
|
67
|
-
/**
|
|
68
|
-
* @param {ObjectDeserializerContext} context context
|
|
69
|
-
* @returns {FallbackModule} deserialized fallback module
|
|
70
|
-
*/
|
|
71
|
-
static deserialize(context: ObjectDeserializerContext): FallbackModule;
|
|
72
|
-
}
|
|
73
|
-
export default FallbackModule;
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
3
|
-
Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy
|
|
4
|
-
*/ 'use strict';
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "default", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function() {
|
|
11
|
-
return _default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const _webpacksources = require("webpack-sources");
|
|
15
|
-
const _Module = /*#__PURE__*/ _interop_require_default(require("webpack/lib/Module"));
|
|
16
|
-
const _ModuleTypeConstants = require("webpack/lib/ModuleTypeConstants");
|
|
17
|
-
const _RuntimeGlobals = /*#__PURE__*/ _interop_require_default(require("webpack/lib/RuntimeGlobals"));
|
|
18
|
-
const _Template = /*#__PURE__*/ _interop_require_default(require("webpack/lib/Template"));
|
|
19
|
-
const _makeSerializable = /*#__PURE__*/ _interop_require_default(require("webpack/lib/util/makeSerializable"));
|
|
20
|
-
const _FallbackItemDependency = /*#__PURE__*/ _interop_require_default(require("./FallbackItemDependency"));
|
|
21
|
-
function _interop_require_default(obj) {
|
|
22
|
-
return obj && obj.__esModule ? obj : {
|
|
23
|
-
default: obj
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
const TYPES = new Set([
|
|
27
|
-
'javascript'
|
|
28
|
-
]);
|
|
29
|
-
const RUNTIME_REQUIREMENTS = new Set([
|
|
30
|
-
_RuntimeGlobals.default.module
|
|
31
|
-
]);
|
|
32
|
-
let FallbackModule = class FallbackModule extends _Module.default {
|
|
33
|
-
/**
|
|
34
|
-
* @returns {string} a unique identifier of the module
|
|
35
|
-
*/ identifier() {
|
|
36
|
-
return this._identifier;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* @param {RequestShortener} requestShortener the request shortener
|
|
40
|
-
* @returns {string} a user readable identifier of the module
|
|
41
|
-
*/ readableIdentifier(requestShortener) {
|
|
42
|
-
return this._identifier;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* @param {LibIdentOptions} options options
|
|
46
|
-
* @returns {string | null} an identifier for library inclusion
|
|
47
|
-
*/ libIdent(options) {
|
|
48
|
-
return `${this.layer ? `(${this.layer})/` : ''}webpack/container/fallback/${this.requests[0]}/and ${this.requests.length - 1} more`;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* @param {Chunk} chunk the chunk which condition should be checked
|
|
52
|
-
* @param {Compilation} compilation the compilation
|
|
53
|
-
* @returns {boolean} true, if the chunk is ok for the module
|
|
54
|
-
*/ chunkCondition(chunk, { chunkGraph }) {
|
|
55
|
-
return chunkGraph.getNumberOfEntryModules(chunk) > 0;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* @param {NeedBuildContext} context context info
|
|
59
|
-
* @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild
|
|
60
|
-
* @returns {void}
|
|
61
|
-
*/ needBuild(context, callback) {
|
|
62
|
-
callback(null, !this.buildInfo);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* @param {WebpackOptions} options webpack options
|
|
66
|
-
* @param {Compilation} compilation the compilation
|
|
67
|
-
* @param {ResolverWithOptions} resolver the resolver
|
|
68
|
-
* @param {InputFileSystem} fs the file system
|
|
69
|
-
* @param {function(WebpackError=): void} callback callback function
|
|
70
|
-
* @returns {void}
|
|
71
|
-
*/ build(options, compilation, resolver, fs, callback) {
|
|
72
|
-
this.buildMeta = {};
|
|
73
|
-
this.buildInfo = {
|
|
74
|
-
strict: true
|
|
75
|
-
};
|
|
76
|
-
this.clearDependenciesAndBlocks();
|
|
77
|
-
for (const request of this.requests)this.addDependency(new _FallbackItemDependency.default(request));
|
|
78
|
-
callback();
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* @param {string=} type the source type for which the size should be estimated
|
|
82
|
-
* @returns {number} the estimated size of the module (must be non-zero)
|
|
83
|
-
*/ size(type) {
|
|
84
|
-
return this.requests.length * 5 + 42;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* @returns {Set<string>} types available (do not mutate)
|
|
88
|
-
*/ getSourceTypes() {
|
|
89
|
-
return TYPES;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* @param {CodeGenerationContext} context context for code generation
|
|
93
|
-
* @returns {CodeGenerationResult} result
|
|
94
|
-
*/ codeGeneration({ runtimeTemplate, moduleGraph, chunkGraph }) {
|
|
95
|
-
const ids = this.dependencies.map((dep)=>//@ts-ignore
|
|
96
|
-
chunkGraph.getModuleId(moduleGraph.getModule(dep)));
|
|
97
|
-
const code = _Template.default.asString([
|
|
98
|
-
`var ids = ${JSON.stringify(ids)};`,
|
|
99
|
-
'var error, result, i = 0;',
|
|
100
|
-
`var loop = ${runtimeTemplate.basicFunction('next', [
|
|
101
|
-
'while(i < ids.length) {',
|
|
102
|
-
_Template.default.indent([
|
|
103
|
-
`try { next = ${_RuntimeGlobals.default.require}(ids[i++]); } catch(e) { return handleError(e); }`,
|
|
104
|
-
'if(next) return next.then ? next.then(handleResult, handleError) : handleResult(next);'
|
|
105
|
-
]),
|
|
106
|
-
'}',
|
|
107
|
-
'if(error) throw error;'
|
|
108
|
-
])}`,
|
|
109
|
-
`var handleResult = ${runtimeTemplate.basicFunction('result', [
|
|
110
|
-
'if(result) return result;',
|
|
111
|
-
'return loop();'
|
|
112
|
-
])};`,
|
|
113
|
-
`var handleError = ${runtimeTemplate.basicFunction('e', [
|
|
114
|
-
'error = e;',
|
|
115
|
-
'return loop();'
|
|
116
|
-
])};`,
|
|
117
|
-
'module.exports = loop();'
|
|
118
|
-
]);
|
|
119
|
-
const sources = new Map();
|
|
120
|
-
sources.set('javascript', new _webpacksources.RawSource(code));
|
|
121
|
-
return {
|
|
122
|
-
sources,
|
|
123
|
-
runtimeRequirements: RUNTIME_REQUIREMENTS
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* @param {ObjectSerializerContext} context context
|
|
128
|
-
*/ serialize(context) {
|
|
129
|
-
const { write } = context;
|
|
130
|
-
write(this.requests);
|
|
131
|
-
super.serialize(context);
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* @param {ObjectDeserializerContext} context context
|
|
135
|
-
* @returns {FallbackModule} deserialized fallback module
|
|
136
|
-
*/ static deserialize(context) {
|
|
137
|
-
const { read } = context;
|
|
138
|
-
const obj = new FallbackModule(read());
|
|
139
|
-
obj.deserialize(context);
|
|
140
|
-
return obj;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* @param {string[]} requests list of requests to choose one
|
|
144
|
-
*/ constructor(requests){
|
|
145
|
-
super(_ModuleTypeConstants.WEBPACK_MODULE_TYPE_FALLBACK);
|
|
146
|
-
this.requests = requests;
|
|
147
|
-
this._identifier = `fallback ${this.requests.join(' ')}`;
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
(0, _makeSerializable.default)(FallbackModule, 'enhanced/lib/container/FallbackModule');
|
|
151
|
-
const _default = FallbackModule;
|
|
152
|
-
|
|
153
|
-
//# sourceMappingURL=FallbackModule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackModule.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy\n*/\n\n'use strict';\n\nimport { RawSource } from 'webpack-sources';\nimport type {\n RequestShortener,\n LibIdentOptions,\n CodeGenerationContext,\n CodeGenerationResult,\n NeedBuildContext,\n WebpackError,\n ResolverWithOptions,\n InputFileSystem,\n Compilation,\n WebpackOptions,\n ObjectDeserializerContext,\n ObjectSerializerContext,\n} from 'webpack/lib/Module';\nimport Module from 'webpack/lib/Module';\nimport type ChunkGraph from 'webpack/lib/ChunkGraph';\nimport Chunk from 'webpack/lib/Chunk';\nimport { WEBPACK_MODULE_TYPE_FALLBACK } from 'webpack/lib/ModuleTypeConstants';\nimport RuntimeGlobals from 'webpack/lib/RuntimeGlobals';\nimport Template from 'webpack/lib/Template';\nimport makeSerializable from 'webpack/lib/util/makeSerializable';\nimport FallbackItemDependency from './FallbackItemDependency';\n\nconst TYPES = new Set(['javascript']);\nconst RUNTIME_REQUIREMENTS = new Set([RuntimeGlobals.module]);\n\nclass FallbackModule extends Module {\n private requests: string[];\n private _identifier: string;\n\n /**\n * @param {string[]} requests list of requests to choose one\n */\n constructor(requests: string[]) {\n super(WEBPACK_MODULE_TYPE_FALLBACK);\n this.requests = requests;\n this._identifier = `fallback ${this.requests.join(' ')}`;\n }\n\n /**\n * @returns {string} a unique identifier of the module\n */\n override identifier(): string {\n return this._identifier;\n }\n\n /**\n * @param {RequestShortener} requestShortener the request shortener\n * @returns {string} a user readable identifier of the module\n */\n override readableIdentifier(requestShortener: RequestShortener): string {\n return this._identifier;\n }\n\n /**\n * @param {LibIdentOptions} options options\n * @returns {string | null} an identifier for library inclusion\n */\n override libIdent(options: LibIdentOptions): string | null {\n return `${this.layer ? `(${this.layer})/` : ''}webpack/container/fallback/${\n this.requests[0]\n }/and ${this.requests.length - 1} more`;\n }\n\n /**\n * @param {Chunk} chunk the chunk which condition should be checked\n * @param {Compilation} compilation the compilation\n * @returns {boolean} true, if the chunk is ok for the module\n */\n override chunkCondition(\n chunk: Chunk,\n { chunkGraph }: { chunkGraph: ChunkGraph },\n ): boolean {\n return chunkGraph.getNumberOfEntryModules(chunk) > 0;\n }\n\n /**\n * @param {NeedBuildContext} context context info\n * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild\n * @returns {void}\n */\n override needBuild(\n context: NeedBuildContext,\n callback: (error: WebpackError | null, result?: boolean) => void,\n ): void {\n callback(null, !this.buildInfo);\n }\n\n /**\n * @param {WebpackOptions} options webpack options\n * @param {Compilation} compilation the compilation\n * @param {ResolverWithOptions} resolver the resolver\n * @param {InputFileSystem} fs the file system\n * @param {function(WebpackError=): void} callback callback function\n * @returns {void}\n */\n override build(\n options: WebpackOptions,\n compilation: Compilation,\n resolver: ResolverWithOptions,\n fs: InputFileSystem,\n callback: (error?: WebpackError) => void,\n ): void {\n this.buildMeta = {};\n this.buildInfo = {\n strict: true,\n };\n\n this.clearDependenciesAndBlocks();\n for (const request of this.requests)\n this.addDependency(new FallbackItemDependency(request));\n\n callback();\n }\n\n /**\n * @param {string=} type the source type for which the size should be estimated\n * @returns {number} the estimated size of the module (must be non-zero)\n */\n override size(type?: string): number {\n return this.requests.length * 5 + 42;\n }\n\n /**\n * @returns {Set<string>} types available (do not mutate)\n */\n override getSourceTypes(): Set<string> {\n return TYPES;\n }\n\n /**\n * @param {CodeGenerationContext} context context for code generation\n * @returns {CodeGenerationResult} result\n */\n override codeGeneration({\n runtimeTemplate,\n moduleGraph,\n chunkGraph,\n }: CodeGenerationContext): CodeGenerationResult {\n const ids = this.dependencies.map((dep) =>\n //@ts-ignore\n chunkGraph.getModuleId(moduleGraph.getModule(dep)),\n );\n const code = Template.asString([\n `var ids = ${JSON.stringify(ids)};`,\n 'var error, result, i = 0;',\n `var loop = ${runtimeTemplate.basicFunction('next', [\n 'while(i < ids.length) {',\n Template.indent([\n `try { next = ${RuntimeGlobals.require}(ids[i++]); } catch(e) { return handleError(e); }`,\n 'if(next) return next.then ? next.then(handleResult, handleError) : handleResult(next);',\n ]),\n '}',\n 'if(error) throw error;',\n ])}`,\n `var handleResult = ${runtimeTemplate.basicFunction('result', [\n 'if(result) return result;',\n 'return loop();',\n ])};`,\n `var handleError = ${runtimeTemplate.basicFunction('e', [\n 'error = e;',\n 'return loop();',\n ])};`,\n 'module.exports = loop();',\n ]);\n const sources = new Map();\n sources.set('javascript', new RawSource(code));\n return { sources, runtimeRequirements: RUNTIME_REQUIREMENTS };\n }\n\n /**\n * @param {ObjectSerializerContext} context context\n */\n override serialize(context: ObjectSerializerContext): void {\n const { write } = context;\n write(this.requests);\n super.serialize(context);\n }\n\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {FallbackModule} deserialized fallback module\n */\n static deserialize(context: ObjectDeserializerContext): FallbackModule {\n const { read } = context;\n const obj = new FallbackModule(read());\n obj.deserialize(context);\n return obj;\n }\n}\n\nmakeSerializable(FallbackModule, 'enhanced/lib/container/FallbackModule');\n\nexport default FallbackModule;\n"],"names":["TYPES","Set","RUNTIME_REQUIREMENTS","RuntimeGlobals","module","FallbackModule","Module","identifier","_identifier","readableIdentifier","requestShortener","libIdent","options","layer","requests","length","chunkCondition","chunk","chunkGraph","getNumberOfEntryModules","needBuild","context","callback","buildInfo","build","compilation","resolver","fs","buildMeta","strict","clearDependenciesAndBlocks","request","addDependency","FallbackItemDependency","size","type","getSourceTypes","codeGeneration","runtimeTemplate","moduleGraph","ids","dependencies","map","dep","getModuleId","getModule","code","Template","asString","JSON","stringify","basicFunction","indent","require","sources","Map","set","RawSource","runtimeRequirements","serialize","write","deserialize","read","obj","constructor","WEBPACK_MODULE_TYPE_FALLBACK","join","makeSerializable"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackModuleFactory.d.ts"],"sourcesContent":["export = FallbackModuleFactory;\ndeclare class FallbackModuleFactory extends ModuleFactory {}\ndeclare namespace FallbackModuleFactory {\n export { ModuleFactoryCreateData, ModuleFactoryResult, FallbackDependency };\n}\nimport ModuleFactory = require('webpack/lib/ModuleFactory');\ntype ModuleFactoryCreateData =\n import('webpack/lib/ModuleFactory').ModuleFactoryCreateData;\ntype ModuleFactoryResult =\n import('webpack/lib/ModuleFactory').ModuleFactoryResult;\ntype FallbackDependency = import('./FallbackDependency');\n"],"names":["FallbackModuleFactory"],"mappings":";iBAASA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ModuleFactoryCreateData, ModuleFactoryResult } from 'webpack/lib/ModuleFactory';
|
|
2
|
-
import ModuleFactory from 'webpack/lib/ModuleFactory';
|
|
3
|
-
export default class FallbackModuleFactory extends ModuleFactory {
|
|
4
|
-
/**
|
|
5
|
-
* @param {ModuleFactoryCreateData} data data object
|
|
6
|
-
* @param {function((Error | null)=, ModuleFactoryResult=): void} callback callback
|
|
7
|
-
* @returns {void}
|
|
8
|
-
*/
|
|
9
|
-
create(data: ModuleFactoryCreateData, callback: (error: Error | null, result?: ModuleFactoryResult) => void): void;
|
|
10
|
-
}
|