-
Notifications
You must be signed in to change notification settings - Fork 629
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
'Use of eval is strongly discouraged' warning in rollup #428
Comments
Hi @neilgd, This is certainly due to the Babel dist of react-paginate. (Cf You can try to transpile yourself from the React-Paginate source code, importing from: import ReactPaginate from './node_modules/react-paginate/react_components/index.js (Then you are responsible for the right Babel/transpiling settings, if any is required on your target) Anyway there is no |
The problem comes from |
I removed it (trying to replace it by react-refresh in dev). No more @AdeleD can you release https://github.com/AdeleD/react-paginate/releases/tag/v8.1.4? Thx |
Another nice thing about this change is that bundle size goes down from 23kB to 15kB. |
Is the replacement of react-hot-loader by react-refresh mandatory? I guess the issue was "just" that react-hot-loader was not correctly removed from the production build, or do I miss something? |
Well, I thought the same, then I read the CHANGELOG on 7.1.3 and related commit, then this comment and quote and finally looked at this (like @silverwind pointed): the issue is that the Babel config does include the react-hot-loader plugin. And that this config is not really meant to The Babel plugin for the react-hot-loader is (considered) production safe, and is really minimal. But it does includes an And for the dev experience, react-hot-loader is deprecated, so I tried react-refresh (but my webpack-dev-middleware setup must be wrong atm). |
Ok, I understand. Thanks for the explanation. |
When using rollup to package a component that references react-paginate, it spits out the following warning:
(!) Use of eval is strongly discouraged https://rollupjs.org/guide/en/#avoiding-eval node_modules/react-paginate/dist/react-paginate.js
I am using version 8.1.3.
Any ideas? Thank you!
The text was updated successfully, but these errors were encountered: