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
As I import screenfull in a react project, the project will crash as webpack cannot import screenfull properly. I find the latest version
provide a esm file. If I import screenfull from node_modules it won't be transpiled by babel by default. The error is as follows:
A possible solution is to include screenfull in webpack config so as to be transpiled by babel-loader.
As a convention a package used in browser exposes a umd format file as a entry, to name a few, style-components,ant-design. So I would recommend provide a umd format rather than esm by default.
The text was updated successfully, but these errors were encountered:
As I import screenfull in a react project, the project will crash as webpack cannot import screenfull properly. I find the latest version
provide a esm file. If I import screenfull from node_modules it won't be transpiled by babel by default. The error is as follows:
A possible solution is to include screenfull in webpack config so as to be transpiled by babel-loader.
As a convention a package used in browser exposes a umd format file as a entry, to name a few, style-components,ant-design. So I would recommend provide a umd format rather than esm by default.
The text was updated successfully, but these errors were encountered: