-
-
Notifications
You must be signed in to change notification settings - Fork 505
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
Eleventy Config ESM Import Issues #3634
Comments
Pro: I can reproduce. Caveat: If you remove the leading dot in ➡ the error you describe will go away. Con: You'll see another error
The reason here: Your |
Ah nice catches, those are typos on my part; I copied over the wrong file when pushing (I was playing around with different sorting implementations to see if the error was an implementation error with a wrong error message or not, the original version called For the import bug, I pushed the version after the initial bug, which states, Interestingly, when I delete my repo directory and clone it, the import bug doesn't show up. Strange. But in an existing repo with a correct sorting implementation and a correct import path, the first error shows up:
Might be one of those strange |
I can see three dots in the import path. On purpose? |
The error message |
Exactly. I cannot reproduce on top of 42571c9989e89cde5b0758923cfe9edb6be7127a.
In those cases I tend to go with something like |
That's a great suggestion! I'll make that change |
To confirm, @alexander-ye it looks like your original issue is now solved - that extra leading dot in the import path being the issue? |
Operating system
macOS Ventura 13.6
Eleventy
3.0.0
Describe the bug
When using ESM imports in the Eleventy config file, I am running I see error logs and the website does not build.
Here for more details, view this snapshot of the broken state: https://github.com/alexander-ye/eleventy-esm-bug-state
Seems related to #3280
Apologies if already fixed in an alpha version or if posting about an already existing thread.
Reproduction steps
npm install
(you can usenpm
versions20.17
,22.13
,23.6
, all fail).npm start
Expected behavior
Eleventy should build and run when using ESM impots/exports, just like it does with cjs imports/exports.
Reproduction URL
https://github.com/alexander-ye/eleventy-esm-bug-state
Screenshots
No response
The text was updated successfully, but these errors were encountered: