Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix locale import for esm #664

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

Open
pzmosquito wants to merge 2 commits into arthurdenner:develop
base: develop
Choose a base branch
Loading
from pzmosquito:feature/fix-locale-import-esm

Conversation

Copy link

@pzmosquito pzmosquito commented Oct 4, 2021

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

Copy link

vercel bot commented Oct 4, 2021
edited
Loading

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
edited
Loading

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

@pzmosquito pzmosquito Oct 11, 2021

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@arthurdenner arthurdenner arthurdenner left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /