-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
Using input: "."
with programmatic API when eleventy setup is in another folder does not work
#3281
Comments
Just so I’m clear here, you’re calling Eleventy programmatically like this:
This sets input to |
I was not aware that they would conflict, it used to work in the past. The main reason for setting It also allows me to check I didn't code something that works only for the programmatic API, in the past I found some minor difference in Eleventy behaviour when run using CLI or programmatic API. But perhaps, they were caused because I am setting the input/output using both the programmatic API and the config file. Edit: If you think this is not a bug and the expected behaviour I can probably keep it the way it is or perhaps detect that I am running via a test runner using an Env variable so switch the config object. |
Yeah, I think what I’m trying to say is that we did some work to make these values consistent notably in #3244 (you can find the related ones from there). There are many different places to set the input and output directory but they never coalesce or merge together, they override each other. I think the only thing you should have to do is remove your |
Removing the And because, I am using the similar dir: {
input: ".",
output: "_site",
}, I think all is good. |
Operating system
macOS Sonoma 14.4
Eleventy
3.0.0-alpha.10
Describe the bug
When using the programmatic API, it seems like using
input: "."
does not work anymore relatively to theinput
directory.I need to use to provide the absolute path instead.
Reproduction steps
npm install
npx vitest
and see that the test failstests/fixtures/minimal/.eleventy.js
and toggle theinput
configuration linenpx vitest
again and see that the test passesExpected behavior
Using
input: "."
as shown below should work:Reproduction URL
No response
Screenshots
No response
The text was updated successfully, but these errors were encountered: