add esbuildOptions param to getConfig#73
Merged
timlrx merged 1 commit intotimlrx:mainfrom Apr 11, 2025
Merged
Conversation
currently only accepts "external" prop as other fields might break the config build process
Owner
|
Thanks much appreciated. I think the approach to just expose the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently it only accepts "external" prop as other fields might break the config build process
fix: #70
To test this, I updated the `next-contentlayer-example` locally with
In file
next.config.jspackage.json{ "name": "next-contentlayer-example", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start" }, "dependencies": { + "@terrastruct/d2": "^0.1.23", + "contentlayer2": "workspace:*", "date-fns": "4.1.0", "next": "^15.2.4", + "next-contentlayer2": "workspace:*", "react": "^19.1.0", "react-dom": "^19.1.0" }, "devDependencies": { "@tailwindcss/postcss": "4.0.17", "@types/react": "19.0.12", "postcss": "^8.4.24", "tailwindcss": "4.0.17", "typescript": "^5.5.0" } }contentlayer.config.jsIf you uncomment
external: ["@terrastruct/d2"],or remove that section entirely, the build / dev will fail.I haven't found any tests that I could update for this usecase, If you want to add one tell me.
I also did not test the cli, only ran the main command to check if the external param was there