-
-
Notifications
You must be signed in to change notification settings - Fork 26
Make it possible to disable code splitting #78
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
Comments
Now unsupported because of Rolldown |
I see. |
I found it's not supported in Rollup either. |
Is there any use cases that need disabling code splitting? |
It looks like one of the main maintainers of remark prefer to keep .ts source and built .d.ts/.js 1:1 (one pair of .d.ts/.js per .ts). |
I personally prefer to bundle source files into single pair of .d.ts and .js. By this, a JS runtime has only to open and parse just one JS file. |
Maybe |
Is it a Rollup's option? I can't try it today because tsup is basically esbuild-powered. I couldn't find such an option in tsup's website. |
Yeah, it's this: https://rollupjs.org/configuration-options/#output-preservemodules |
I googled it and it looks like what I've wanted. However I can't try it today unfortunately because I don't use Vite or Rollup to build my libraries. |
Clear and concise description of the problem
tsup can disable code splitting by the following config:
However, tsdown doesn't have such a
splitting
property.Disabling code splitting improves readability and analyzability of output JS code.
tsup's doc: https://tsup.egoist.dev/#code-splitting
Suggested solution
Support
splitting
propertyAlternative
Use tsup instead of tsdown. tsup has already been able to disable splitting.
Additional context
I tried tsdown in my packages in https://github.com/tats-u/markdown-cjk-friendly/, but gave up due to the lack of this feature.
Validations
The text was updated successfully, but these errors were encountered: