@appigram/react-code-split-ssr 1.2.15 → 1.2.16

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.
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export interface IProps {
3
+ mod: Promise<any>;
4
+ loading?: React.FC;
5
+ }
6
+ declare const Bundle: ({ mod, loading }: IProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default Bundle;
@@ -1,27 +1,18 @@
1
- import * as React from 'react';
1
+ import React from "react";
2
2
  export interface IJSXModule {
3
- default: React.SFC | React.ComponentClass;
3
+ default: React.FC | React.ComponentClass;
4
4
  }
5
5
  export interface ISSRRoute {
6
- path: string;
7
- component: () => React.SFCElement<{
8
- mod: Promise<IJSXModule>;
9
- }>;
10
- exact?: boolean;
11
- strict?: boolean;
12
- }
13
- export interface IRedirects {
14
- from: string;
15
- to: string | object;
16
- push?: boolean;
6
+ caseSensitive?: boolean;
7
+ children?: React.ReactNode;
8
+ element?: any;
9
+ index?: boolean;
10
+ path?: string;
17
11
  }
18
12
  export interface IOptions {
19
13
  pathname: string;
20
14
  routes: ISSRRoute[];
21
- redirects?: IRedirects[];
22
- notFoundComp?: () => React.SFCElement<{
23
- mod: Promise<IJSXModule>;
24
- }>;
15
+ notFoundComp?: any;
25
16
  }
26
- declare const generateRoutes: (options?: IOptions) => Promise<any>;
17
+ declare const generateRoutes: (options?: IOptions) => Promise<import("react/jsx-runtime").JSX.Element>;
27
18
  export default generateRoutes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appigram/react-code-split-ssr",
3
- "version": "1.2.15",
3
+ "version": "1.2.16",
4
4
  "description": "React code splitting with SSR",
5
5
  "main": "./lib/index.js",
6
6
  "scripts": {
package/tsconfig.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "outDir": "./lib",
3
+ "outDir": "lib",
4
4
  "target": "ES6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
5
5
  "module": "esnext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
6
6
  "lib": [
@@ -10,10 +10,11 @@
10
10
  "allowJs": true /* Allow javascript files to be compiled. */,
11
11
  "jsx": "react-jsx" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
12
12
  "noImplicitAny": false /* Raise error on expressions and declarations with an implied 'any' type. */,
13
- "moduleResolution": "node" ,
13
+ "moduleResolution": "node",
14
14
  "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
15
15
  "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
16
- "skipLibCheck": true
16
+ "skipLibCheck": true,
17
+ "declaration": true
17
18
  },
18
19
  "include": ["src/**/*"],
19
20
  "exclude": ["node_modules", "build", "scripts", "webpack", "jest"]