arqex / react-datetime

A lightweight but complete datetime picker react component.
2k stars 872 forks source link

Minified React error #130 #843

Open ignacio-dev opened 2 years ago

ignacio-dev commented 2 years ago

I'm Submitting a ...

[ X] Bug report
[ ] Feature request
[ ] Support request

Steps to Reproduce

  1. Install package using npm
  2. Insert component in a page
  3. Running npm run build using Vite (in Laravel) (works well on npm run dev)

Expected Results

Datetime to render with no errors

Actual Results

App crashes, console shows: Error: Minified React error #130;

Minimal Reproduction of the Problem

Other Information (e.g. stacktraces, related issues, suggestions how to fix)

baledev commented 2 years ago

Face the same error, it's a known issue mentioned in rollup/plugin#481.

My hacky sollution is:

import ReactDatetimeClass from "react-datetime"; const DateTime = ReactDatetimeClass.default ?? ReactDatetimeClass;