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]: Avoid modifying existing codes/configs when init modernjs from an existing repo #5837

Open
yf-yang opened this issue Jun 16, 2024 · 0 comments
Assignees

Comments

@yf-yang
Copy link

yf-yang commented Jun 16, 2024

What problem does this feature solve?

I am trying to convert a module repo to modern.js module, so I run pnpm create @modern-js, it is the recommended way to init an existing repo. Actually it does the following:

  1. Update package.json (overrides everything)
  2. Update src/index.ts
  3. Commit working changes

Change 1 is unpleasing as existing repo has its own dependencies, scripts...
Change 2/3 are unexpected. Editors could have caches and those changes are not even explicitly notified, so I spent hours figuring out if rspack etc. have bugs.

Suggestion:

  1. When enabling modern.js in an existing repo, do incremental change instead of complete overwrite.
  2. Notify the file changes, git commits, and anything else that I haven't even observed.

What does the proposed API look like?

Nope

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

No branches or pull requests

2 participants