You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using babel-plugin-transform-jsx-to-htm in a webpack project, it returns an invalid plugin: the inherits option gets a module object ({default: jsx(), _esModule: true}) instead of jsx()
This occurs because webpack loads the *.mjs file (pointed by package module field) and imports @babel/plugin-syntax-jsx as a module object instead of importing the default export.
As a workaround add resolve: { mainFields: ['main'] } to webpack configuration
The text was updated successfully, but these errors were encountered:
When using babel-plugin-transform-jsx-to-htm in a webpack project, it returns an invalid plugin: the inherits option gets a module object (
{default: jsx(), _esModule: true}
) instead ofjsx()
This occurs because webpack loads the *.mjs file (pointed by package module field) and imports @babel/plugin-syntax-jsx as a module object instead of importing the default export.
As a workaround add
resolve: { mainFields: ['main'] }
to webpack configurationThe text was updated successfully, but these errors were encountered: