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

Option to convert exported objects into individual exports #23

Open
tinchoz49 opened this issue Oct 24, 2021 · 0 comments
Open

Option to convert exported objects into individual exports #23

tinchoz49 opened this issue Oct 24, 2021 · 0 comments
Labels
feature request New feature or request

Comments

@tinchoz49
Copy link

Hi @wessberg, thank you for work on this library.

I want to ask you if it's any chance to add an option for specific exports module resolution.

I have a module that is exporting an object, like this:

const obj = {
  foo () {
    return 2 + 2
  },
  bar: 3,
  baz: new RegExp('')
}
module.exports = obj

And in this particular case the resolution needs to be:

export function foo() {
	return 2 + 2;
}
export const bar = 3;
export const baz = new RegExp("");
export default {foo, bar, baz};

but it's only export into:

const obj = {
  foo () {
    return 2 + 2
  },
  bar: 3,
  baz: new RegExp('')
}
export default obj;
@wessberg wessberg added the feature request New feature or request label Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants