flight-client-entry-plugin.d.ts 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. import { webpack } from 'next/dist/compiled/webpack/webpack';
  2. import type { CssImports, ClientComponentImports } from '../loaders/next-flight-client-entry-loader';
  3. interface Options {
  4. dev: boolean;
  5. isEdgeServer: boolean;
  6. }
  7. export declare const injectedClientEntries: Map<any, any>;
  8. export declare class FlightClientEntryPlugin {
  9. dev: boolean;
  10. isEdgeServer: boolean;
  11. constructor(options: Options);
  12. apply(compiler: webpack.Compiler): void;
  13. createClientEndpoints(compiler: any, compilation: any): Promise<void>;
  14. collectClientComponentsAndCSSForDependency({ layoutOrPageRequest, compilation, dependency, }: {
  15. layoutOrPageRequest: string;
  16. compilation: any;
  17. dependency: any;
  18. }): [ClientComponentImports, CssImports];
  19. injectClientEntryAndSSRModules({ compiler, compilation, entryName, clientComponentImports, bundlePath, }: {
  20. compiler: any;
  21. compilation: any;
  22. entryName: string;
  23. clientComponentImports: ClientComponentImports;
  24. bundlePath: string;
  25. }): Promise<boolean>;
  26. addEntry(compilation: any, context: string, entry: any, options: {
  27. name: string;
  28. layer: string | undefined;
  29. }): Promise<any>;
  30. }
  31. export {};