wojtekmaj / react-datetime-picker

A datetime picker for your React app.

Home Page:https://projects.wojtekmaj.pl/react-datetime-picker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unclear how to import if using Typescript + Vite

james-yeoman opened this issue · comments

The Readme mentions to use entry.nostyle.js if using Vite. However, the types at definitelytyped completely break if this is done.

Is there any way of getting this to work correctly?

commented

Hello. In my project it works fine. Just importing component from lib and nothing else. For styling I cutted and pasted styles to my codebase and rewrite it with !important. Not cool solution, i know. But it is what it is

Externally provided types may have various level of success indeed. The good news is, I'm hard at work rewriting this lib to TypeScript. The ground work has already been laid.

Closing as:

  • Now everyone have to manually import styles - auto import proved to be super unreliable on multiple tools (Next.js, Vite)
  • Package is now natively in TypeScript