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

allow for import "dotenv/config.js" #534

Merged
merged 1 commit into from May 19, 2021
Merged

allow for import "dotenv/config.js" #534

merged 1 commit into from May 19, 2021

Conversation

paulrobertlloyd
Copy link
Contributor

@paulrobertlloyd paulrobertlloyd commented May 15, 2021

Adding dotenv/config as a named export in 8.5.0 had the side effect of dotenv/config.js no longer being recognised as an import path.

For example, after upgrading to 9.0.0, I got the following error:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './config.js' is not defined by "exports" in /Users/paulrobertlloyd/Sites/indiekit/node_modules/dotenv/package.json imported from /Users/paulrobertlloyd/Sites/indiekit/packages/indiekit/tests/unit/middleware/indieauth.js

Some linters enforce using file extensions in imports, i.e. eslint-plugin-import and eslint-plugin-node.

Explicitly adding dotenv/config.js ensures projects following this style can continue to use the .js extension when importing dotenv.

@motdotla
Copy link
Owner

Thanks for this @paulrobertlloyd. Will get to reviewing this and processing soon.

@motdotla motdotla merged commit a70b641 into motdotla:master May 19, 2021
@motdotla
Copy link
Owner

Released in 10.0.0 v9.0.2...v10.0.0

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