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

Unnamed imports are not built #9

Open
aLemonFox opened this issue Jun 20, 2024 · 2 comments
Open

Unnamed imports are not built #9

aLemonFox opened this issue Jun 20, 2024 · 2 comments
Assignees

Comments

@aLemonFox
Copy link

Hi, first of all, thanks a lot for your work. This helped me out a lot. I'm using dotenv in my functions but it's not included in the built package.json, all other dependencies work fine. This is probably because it is imported like this:

import 'dotenv/config';

// my code

When I try to include it manually using docts build --include-dependencies dotenv I get node_modules/dotenv/package.json (2:8): Expected ';', '}' or <eof> (Note that you need @rollup/plugin-json to import JSON files). Is this something that can be fixed easily?

@kwameopareasiedu
Copy link
Owner

kwameopareasiedu commented Jun 20, 2024

Hi @aLemonFox. Thanks for using the project and thanks for your feedback.

From the error message, it seems like dotenv/config at a point import a json file, but the build setup I used doesn't support json. This is most likely the error here, but I'll also look into why specifying it using the --include-dependencies flag didn't work.

I'll get to it in a few hours time...

@kwameopareasiedu kwameopareasiedu self-assigned this Jun 20, 2024
@aLemonFox
Copy link
Author

Cool, no worries. I just manually add it to the package.json for now

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

No branches or pull requests

2 participants