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
{{ message }}
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.
With version 2.6.1 of rollup-plugin-babel I am getting these errors in the console:
The 'createClass' Babel helper is used more than once in your code. It's strongly recommended that you use the "external-helpers" plugin or the "es2015-rollup" preset. See https://github.com/rollup/rollup-plugin-babel#configuring-babel for more information
The 'classCallCheck' Babel helper is used more than once in your code. It's strongly recommended that you use the "external-helpers" plugin or the "es2015-rollup" preset. See https://github.com/rollup/rollup-plugin-babel#configuring-babel for more information
I have investigated the bundle and I know exactly why it is warning: I am importing a file in node_modules which has been pre-transpiled, so it is using ES6 modules but ES5 syntax, therefore it includes its own internal version of createClass and classCallCheck. From what I understand, this is exactly what package authors are supposed to do.
Ideally rollup-plugin-babel would be smart enough to figure out that this is okay, but in the meantime I would really like to silence these warnings.
So I tried defining an onwarn function in my rollup.config.js:
With version
2.6.1
ofrollup-plugin-babel
I am getting these errors in the console:I have investigated the bundle and I know exactly why it is warning: I am importing a file in
node_modules
which has been pre-transpiled, so it is using ES6 modules but ES5 syntax, therefore it includes its own internal version ofcreateClass
andclassCallCheck
. From what I understand, this is exactly what package authors are supposed to do.Ideally
rollup-plugin-babel
would be smart enough to figure out that this is okay, but in the meantime I would really like to silence these warnings.So I tried defining an
onwarn
function in myrollup.config.js
:This works fine for warnings generated by Rollup itself, but does not work for the warnings generated by
rollup-plugin-babel
(such as the above).The text was updated successfully, but these errors were encountered: