Closed leo-quimbee closed 1 year ago
Hi @leo-quimbee, to import the included JavaScript file, you'll need to use:
import "chartkick"
I may include the ES module in the gem at some point, but don't see a strong reason for including it now.
@ankane thanks for closing my duplicate issue. Leo is a coworker of mine, and I didn't realize we both created the same issue 😅
So am I understanding correctly that we must use a global reference to Chartkick
? I'd really prefer not to pollute the global namespace, if at all possible. That should be possible, as long as we have the ES module included in the gem. Or reference the library on JSPM, which we're doing currently, but isn't actually documented in the readme, and we also have to reference Chart.bundle.js
via the gem regardless, because it doesn't seem to be available on JSPM.
Describe the bug I am trying to import the Chartkick object
But I get this error
To reproduce Steps to reproduce.
add chartkick to importmap
try to import Chartkick object
Workaround The work around we found is to point to jspm