Nodlik / react-st-modal

Simple and flexible modal dialog component for React JS
https://nodlik.github.io/react-st-modal/
MIT License
41 stars 3 forks source link

Not compatible with nextjs #3

Open SHAGGYER opened 3 years ago

SHAGGYER commented 3 years ago

When importing CustomDialog, I get an error. My code is:

const CustomDialogPromise = import("react-st-modal").then(
  (module) => module.CustomDialog
);

The error is:

SyntaxError: Cannot use import statement outside a module
davedigi commented 3 years ago

i have this problem too. But not in development, only in production. in local production and in Vercel too