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

By default search for .eleventy.cjs config file #1028

Closed
zachleat opened this issue Mar 20, 2020 · 2 comments · Fixed by #2464
Closed

By default search for .eleventy.cjs config file #1028

zachleat opened this issue Mar 20, 2020 · 2 comments · Fixed by #2464

Comments

@zachleat
Copy link
Member

If .eleventy.cjs exists, otherwise look for previous default .eleventy.js.

Related to #837.

@zachleat zachleat added this to To do in Support ESM and .cjs Files via automation Mar 20, 2020
Snapstromegon added a commit to Snapstromegon/eleventy that referenced this issue Jun 29, 2022
…ult eleventy config files

Currently only .eleventy.js is supported as the default config file.

This PR implements a possible solution for multiple config file. It intentionally just implements support for multiple default config files.

The implementation might be a little flaky around unittests, but it passes all of them consistently.

A future PR should probably look into allowing usage of multiple config files at once. This only uses the first existing one.

Signed-off-by: Raphael Höser <raphael@hoeser.info>
zachleat added a commit that referenced this issue Aug 16, 2022
…ible-default-config-files

#1028 #1029 Possible first implementation for additional default eleventy config files
@zachleat
Copy link
Member Author

zachleat commented Aug 16, 2022

Shipping with 2.0.0-canary.15

@zachleat zachleat added this to the Eleventy 2.0.0 milestone Aug 16, 2022
@zachleat zachleat moved this from To do to Done in Support ESM and .cjs Files Aug 16, 2022
@zachleat zachleat removed this from the Eleventy 2.0.0 milestone Aug 16, 2022
@zachleat
Copy link
Member Author

Sorry y’all—had a change of heart on this one.

We won’t look for .eleventy.cjs by default—but we will look for eleventy.config.cjs by default as noted in #1029. I would love to encourage folks away from the dot file prefix and as such I want to avoid adding extra features that use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
1 participant