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

Issue when trying to transform module.exports with object #28

Open
samuelgja opened this issue Oct 18, 2022 · 0 comments
Open

Issue when trying to transform module.exports with object #28

samuelgja opened this issue Oct 18, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@samuelgja
Copy link

samuelgja commented Oct 18, 2022

  • Version: 2.1.2
  • TypeScript Version: 4.8.4
  • Operating System and version (if applicable): mac
  • Node Version (if applicable): 14.18

Desc

First at all, thanks for thus transformer, it works in 99% scenarios.

But still there are some scenarios where it's not working.
For example

module.exports = {
    'font-face': require('./font-face'),
};

will transform into the:

export const font-face = require('./font-face');
export default {
    font-face,
};

Check font-face transform - assigned to the new const value but in incorrect syntax: "font-face"

Expected behaviour

  • do not assign new const value and keep it somehow in export default statement?
  • or when creating new const value check if its in correct syntax.
@samuelgja samuelgja added the bug Something isn't working label Oct 18, 2022
@samuelgja samuelgja changed the title Issue when trying to transform module.exports with objec Issue when trying to transform module.exports with object Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant