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

[Feature]: Support _meta.{js,ts} #961

Open
SoonIter opened this issue Apr 15, 2024 · 1 comment · May be fixed by #1044
Open

[Feature]: Support _meta.{js,ts} #961

SoonIter opened this issue Apr 15, 2024 · 1 comment · May be fixed by #1044
Assignees

Comments

@SoonIter
Copy link
Member

What problem does this feature solve?

  1. Support comments. In the json file, it is usually very inconvenient for developers to write code comments. We don't know that we use jsonc or json5 to parse it. Supporting _meta.jsonc or _meta.json5 will make it complicated. This is a historical problem.

  2. Support more flexible grammar and better DX

const meta = [...].map((item) => ({
    title: 'I am a title',
    link: item.link
    // ...
}))
export default meta;
  1. Support conditional compilation, such as process.env

What does the proposed API look like?

shuding/nextra#852

@SoonIter SoonIter linked a pull request Apr 29, 2024 that will close this issue
2 tasks
@canyuegongzi
Copy link

Is there a plan to iteratively support process.env?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants