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
I made an ad hoc plugin with a load() method. From this load() method, I returned a buffer in some cases, forgetting to call .toString() before returning (common mistake).
Rollup should probably throw a TypeError if a plugin returns anything except a string/null/undefined.
But strangely, when I return a buffer, rollup behaves as if I had returned a string, i.e. it continues to the transforms... except it then passes undefined into the first transform. In my case, this led to the following error:
Cannot read property 'search' of undefined
at transform in node_modules/rollup-plugin-inject/dist/rollup-plugin-inject.cjs.js:111:12
which comes from this line in rollup-plugin-inject:
if(code.search(firstpass)==-1)returnnull;
The text was updated successfully, but these errors were encountered:
I made an ad hoc plugin with a
load()
method. From thisload()
method, I returned a buffer in some cases, forgetting to call.toString()
before returning (common mistake).Rollup should probably throw a TypeError if a plugin returns anything except a string/null/undefined.
But strangely, when I return a buffer, rollup behaves as if I had returned a string, i.e. it continues to the transforms... except it then passes
undefined
into the first transform. In my case, this led to the following error:which comes from this line in rollup-plugin-inject:
The text was updated successfully, but these errors were encountered: