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

Export parseModule and generateCode in a different module that doesn't rely on node api #72

Open
1 task done
paoloricciuti opened this issue Jul 29, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@paoloricciuti
Copy link

Describe the feature

Currently parseModule and generateCode are exported from the code module that import node:fs this made them impossible to use in a browser environment when actually they are not really dependent on node apis.

Maybe we can consider export them from another module that does not depends on node api to allow their usage even in the browser.

Additional information

  • Would you be willing to help implement this feature?
@antfu
Copy link
Member

antfu commented Jul 30, 2023

Yeah I think it makes sense to have a submodule for that. PR Welcome :)

@antfu antfu added the enhancement New feature or request label Jul 30, 2023
@paoloricciuti
Copy link
Author

Yeah I think it makes sense to have a submodule for that. PR Welcome :)

Should I still re-export them from the current module to avoid breaking changes?

@antfu
Copy link
Member

antfu commented Jul 30, 2023

Yes. I think we could have magicast/browser or magicast/core for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants