-
Notifications
You must be signed in to change notification settings - Fork 76
Switch config file require to dynamic import #2047
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
base: main
Are you sure you want to change the base?
Conversation
|
Hey @elylucas , any chance you can have a look over this PR please 🙏🏼 |
|
Hey @Brad-Turner. Thank you so much for the PR. We're taking a look at this right now. To help us with the code review could you give us some more information about the context driving these changes?
|
|
Hey @Niko-Berry-Contentful , Sorry for the delayed response. Busy time planning my wedding 😅
import contentfulExport from 'contentful-export';
await contentfulExport({ /* settings, etc */ }); At my work, we often script exports, transforms and uploads and this is kind of annoying when I have to switch between runtimes to export from/import to contentful. |
|
Hey @Brad-Turner, thank you for this PR. You are right, in a pure ESM environment we won't have require available. I have a few issue with your changes:
Thank you so far, Note to myself: We need to mirror this change to contentful-import as well |
This PR aims to improve ESM compatibility by removing the
requirecall to load an external config file.