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

Support loading transpiled JS config files #692

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

Tomas2D
Copy link
Contributor

@Tomas2D Tomas2D commented Sep 19, 2022

This pull request aims to finish previously opened pull request #566. Adding support for transpiled JS modules (those with module.exports = config) is helpful when you have a config directory inside your src directory in the TypeScript project.

To ensure that the file is transpiled and to preserve backward compatibility, I have added a check for __esModule and the default property that it is an object.

@Tomas2D
Copy link
Contributor Author

Tomas2D commented Oct 10, 2022

ping @markstos

@markstos markstos merged commit 4da385c into node-config:master Oct 19, 2022
@Tomas2D Tomas2D deleted the transpiled-js-modules branch October 19, 2022 19:34
@Tomas2D
Copy link
Contributor Author

Tomas2D commented Dec 19, 2022

@markstos would you mind bumping a new version? Thanks!

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.

None yet

2 participants