Skip to content

Commit

Permalink
Compress import + export statements [refactor]
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Apr 6, 2020
1 parent 3178f07 commit f21612c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ import {CHUNKS_READY, NOT_LOADED, LOADED, ERRORED} from './constants.js';
const IS_NODE = typeof window === 'undefined';

// Exports
export default lazy;

function lazy(loader, options) {
export default function lazy(loader, options) {
// Conform inputs
if (!isFunction(loader)) throw new Error('Loader function must be provided');

Expand Down
3 changes: 1 addition & 2 deletions test/fixtures/src/1 lazy no-ssr/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
* ------------------*/

// Modules
import React from 'react';
import React, {Suspense} from 'react';
import lazy from 'react-lazy-ssr';

// Lazy-loaded components
const Lazy1 = lazy(() => import('./Lazy1.jsx'), {noSsr: true});

// Exports
const {Suspense} = React;

export default function App() {
return (
Expand Down
3 changes: 1 addition & 2 deletions test/fixtures/src/1 lazy ssr/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
* ------------------*/

// Modules
import React from 'react';
import React, {Suspense} from 'react';
import lazy from 'react-lazy-ssr';

// Lazy-loaded components
const Lazy1 = lazy(() => import('./Lazy1.jsx'));

// Exports
const {Suspense} = React;

export default function App() {
return (
Expand Down

0 comments on commit f21612c

Please sign in to comment.