Skip to content

Support ESM import syntax for plugins #733

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

Closed
theoludwig opened this issue Aug 16, 2021 · 0 comments
Closed

Support ESM import syntax for plugins #733

theoludwig opened this issue Aug 16, 2021 · 0 comments

Comments

@theoludwig
Copy link
Contributor

What is the current behavior?

Currently, styled-jsx plugins can't be written with ESM imports syntax because it requires the import instead of using dynamic import syntax.

The problematic line of code is:

let p = require(plugin)

What is the expected behavior?

styled-jsx should be able to work with plugins written with ESM.

Related: Thream/styled-jsx-plugin-sass#68

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

No branches or pull requests

1 participant