-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
base: develop
Are you sure you want to change the base?
fix locale import for esm #664
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/arthurdenner/react-semantic-ui-datepickers/2987w7Z1XWpkW4jmUCYcsSKVgZAz |
@@ -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"; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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. |
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 ESimport
.Checklist: