next-app-loader.d.ts 727 B

1234567891011121314151617181920212223
  1. import type webpack from 'webpack';
  2. import type { ValueOf } from '../../../shared/lib/constants';
  3. export declare const FILE_TYPES: {
  4. readonly layout: "layout";
  5. readonly template: "template";
  6. readonly error: "error";
  7. readonly loading: "loading";
  8. };
  9. declare type ComponentModule = () => any;
  10. export declare type ComponentsType = {
  11. readonly [componentKey in ValueOf<typeof FILE_TYPES>]?: ComponentModule;
  12. } & {
  13. readonly layoutOrPagePath?: string;
  14. readonly page?: ComponentModule;
  15. };
  16. declare const nextAppLoader: webpack.LoaderDefinitionFunction<{
  17. name: string;
  18. pagePath: string;
  19. appDir: string;
  20. appPaths: string[] | null;
  21. pageExtensions: string[];
  22. }>;
  23. export default nextAppLoader;