Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix locale import for esm #664

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

pzmosquito
Copy link

What kind of change does this PR introduce?
This PR fixes the locale import issue for esm js file.

What is the current behavior?
see issue #176

What is the new behavior?
The fix will replace the require module with native ES import.

Checklist:

  • Documentation
  • Tests
  • Ready to be merged

@vercel
Copy link

vercel bot commented Oct 4, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/arthurdenner/react-semantic-ui-datepickers/2987w7Z1XWpkW4jmUCYcsSKVgZAz
✅ Preview: https://react-semantic-ui-datepickers-git-fork-pzmo-b9256b-arthurdenner.vercel.app

@@ -17,6 +17,7 @@ import { BasicDatePicker, RangeDatePicker } from './pickers';
import { Locale, SemanticDatepickerProps } from './types';
import Calendar from './components/calendar';
import Input from './components/input';
import localeOptions from "./locales";
Copy link
Owner

@arthurdenner arthurdenner Oct 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct me if I'm wrong but this would bundle all of the locales into the project, and we don't want to do that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct that it does includes all locales. This is quickest (but not ideal) solution to make this work without needing to refactor a lot of code to accommodate dynamic import. Please feel free to close the PR and go with one of the options @wollo suggested in the issue.

@stale
Copy link

stale bot commented Apr 17, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants