You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was not able to find a way to keep the default export. I don't have any experience with bundling lib, but I suppose it's a problem with the different modules systems.
The text was updated successfully, but these errors were encountered:
Thanks for reporting @tatchi .
This issue was not noticed before because in ours tests we were importing the getBundles straight from its path, e.g. import getBundles from 'react-loadable-ssr-addon/lib/getBundles'.
TypeError: Object(...) is not a function
With the new version 0.11 which fix issue #1, I have now an error when trying to import the
getBundles
function.import { getBundles } from 'react-loadable-ssr-addon'
Expected Behavior
No Errors
Current Behavior
I got the following error:
Possible Solution
I was able to make it work if in the
index.js
file, we export the two modules like that:module.exports = { ReactLoadableSSRAddon, getBundles };
and we import them like:
const { ReactLoadableSSRAddon } = require('react-loadable-ssr-addon');
import { getBundles } from 'react-loadable-ssr-addon'
I was not able to find a way to keep the default export. I don't have any experience with bundling lib, but I suppose it's a problem with the different modules systems.
The text was updated successfully, but these errors were encountered: