Reputation: 717
I don't see how the answer to this question, @rollup/plugin-inject, solves my problem. So I'm asking a new question. Rollup is appending a $1
suffix to four names that my rolled-up module exports. My module has no external dependencies and I can't find any of the four names documented as already defined in the global scope
C
E
Is
CFunc
Why does Rollup consider these previously declared? Or is there another reason for this?
How do I prevent this? Or should I wrap these in a namespace? Anyone who imports them can wrap them or alias them.
This is a JavaScript library with named exports. The repo is here: https://github.com/sidewayss/rAF
See src/globals/js
for the first three names. The fourth is declared in src/prop/func.js
. See rollup.config.mjs
for the Rollup configuration.
Also, see this previous question for various answers to a part of this question: Rollup says my const names are global, renames them with $1 suffix
Upvotes: 0
Views: 92
Reputation: 717
I figured this all the way out, and only because @rollup/plugin-replace doesn't replace all the $1
suffixes (it does replace some). This was caused by two things:
$1
had been eliminated.import {name} from "...";
solved that.Now there is no more $1
in my bundled file, and I can uncomment my plugins and continue debugging.
Upvotes: 1