-
Notifications
You must be signed in to change notification settings - Fork 507
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
Add --preserveModules (similar to babel --out-dir
)
#321
Comments
popular feature request. i'll leave it to jared. |
@yordis it sounds like what you're looking for is Rollup's module.exports = {
rollup(config, opts) {
if (opts.format === 'esm') {
config = { ...config, preserveModules: true }
config.output = { ...config.output, dir: 'dist/', entryFileNames: '[name].esm.js' }
delete config.output.file
}
return config
} One last edit: updated to the same as #276 (comment), please see #276 for discussion and evolution of the You'll have to change your This is only for ESM as, per #276 (comment), CJS
|
babel --out-dir
)
Going to close this as a duplicate of #276 since these are around the same feature and the use-case has evolved there. Please see #276 for discussion on I've updated my comment above to the latest workaround from #276 as well. |
Current Behavior
We need to specify an entry point.
Desired Behavior
Specify
--outDir
over an entry pointSuggested Solution
I am interested in having TypeScript/Babel CLI like compilations rather than outputting a single file.
Who does this impact? Who is this for?
All users, friendly for ESM builds without having to import everything in the entry file.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: