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

docs: fix import example for ES 2015 at: loading-into-nodejs.md #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elizatlawy
Copy link

@elizatlawy elizatlawy commented Aug 10, 2023

The import as described in the documentation does not work:

import AdvancedFormat from 'dayjs/plugin/advancedFormat' // ES 2015
It should be:

import AdvancedFormat from 'dayjs/plugin/advancedFormat.js' // ES 2015

The import as described in the documentation does not work:

import AdvancedFormat from 'dayjs/plugin/advancedFormat' // ES 2015

It should be:

import AdvancedFormat from 'dayjs/plugin/advancedFormat.js' // ES 2015
@iamkun
Copy link
Member

iamkun commented Dec 30, 2023

Thanks, I see the related issue. Can you please provide a re-production instruction so that I can check it in depth?

@elizatlawy
Copy link
Author

@iamkun try to import it:

import advancedFormat from 'dayjs/plugin/advancedFormat';

@ArpadGBondor
Copy link

Please update the documentation to suggest using
// import AdvancedFormat from 'dayjs/plugin/advancedFormat.js' // ES 2015
instead of
// import AdvancedFormat from 'dayjs/plugin/advancedFormat' // ES 2015
for plugins.

This could have saved a day of headache for me.

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.

3 participants