I'm in the process of porting my ember app to ember-cli. I have top level function I'm using that's define like var fooBar = function(a) { };
.
I moved that to app/utils/foo-bar.js (it was all in js/app.js), and added export default fooBar;
to the end of the file.
I think that would be fine if the place I was using it could do an import, but for reasons I don't want to get into, I need defined as a global variable.
But I still want it in app/utils/ and to be able to import it, as I might rewrite the thing causing me to need it to be a global someday.
Is there some way to maybe have a <script>
tag in my index.html that looks up the module and assigns it to a global variable?
Aucun commentaire:
Enregistrer un commentaire