uvarov-frontend / vanilla-calendar-pro

The Vanilla Calendar Pro is a versatile JavaScript date and time picker component with TypeScript support, making it compatible with any JavaScript frameworks and libraries. It is designed to be lightweight, easy to use, and feature-rich, without relying on external dependencies.
https://vanilla-calendar.pro
Other
482 stars 60 forks source link

regression in v3 between than beta.17 and beta.33: `/build` folder not part of npm package in v3.0.0-beta.33 #323

Closed johanrd closed 3 weeks ago

johanrd commented 3 weeks ago

npm install vanilla calendar pro 3.0.0-beta.33 and see that the built package folder build is not included:

npm package in 3.0.0-beta.33
Screenshot 2024-11-06 at 09 25 04
Expected from e.g. beta.17: npm package in 3.0.0-beta.17
Screenshot 2024-11-06 at 09 24 18
johanrd commented 3 weeks ago

or, maybe I'm fooling myself about the expected format.

Anyways, the instructions in the readme does not work in beta.33, at least. Then the following runtime errors occur:

import VanillaCalendar from 'vanilla-calendar-pro';
// TypeError: vanilla_calendar_pro__WEBPACK_IMPORTED_MODULE_5__.default is not a constructor

import 'vanilla-calendar-pro/styles/vanilla-calendar-pro.min.css';
// Error: Could not find module `vanilla-calendar-pro/styles/vanilla-calendar-pro.min.css` imported from `(require)`
uvarov-frontend commented 3 weeks ago

Please wait for the updated documentation, the old readme will work in the new version since critical changes have been made.

There is no build folder anymore, in beta.33 you export styles like this: import 'vanilla-calendar-pro/styles/index.css'; And the calendar itself is like this: import { VanillaCalendarPro } from 'vanilla-calendar-pro';

Most likely, the import of the calendar in the next beta version will be replaced from VanillaCalendarPro to Calendar.

johanrd commented 3 weeks ago

great, thanks, verified!

Most likely, the import of the calendar in the next beta version will be replaced from VanillaCalendarPro to Calendar.

agreed!