#Konstrukteur

1 messages · Page 1 of 1 (latest)

shadow plankBOT
polar topaz
#

hi! what's an import map? not something I'm familiar with.

snow shale
#

"Import maps let you import JavaScript modules using logical names that map to versioned/digested files – directly from the browser. So you can build modern JavaScript applications using JavaScript libraries made for ES modules (ESM) without the need for transpiling or bundling. This frees you from needing Webpack, Yarn, npm, or any other part of the JavaScript toolchain. All you need is the asset pipeline that's already included in Rails."

polar topaz
#

you probably can't use it for Stripe.js, we don't version that, you must always directly load it from our URL

#

looking at the docs it relies on the dependency being packaged in a certain way and declaring a version and things? if so then I don't see how they would work with stripe.js

snow shale
#

I have to admit, that I am still working that out. I am not sure, if it is only a rails thing

#
#

I was happy to be able to switch to the new way of including js into rails, to get everything working and stopped there. I thought I could load all external libraries or code in the same place.

#

I suppose I am misunderstanding something here

polar topaz
#

I don't know really, we don't know anything specific about Rails here I'm afraid

snow shale
#

I think that could be it

#

No, problem. I asked in the Rails community too. Your suggestion really gives me direction to continue my search. I have to learn more about how modules and import maps interact with classic js code and what that means for my projects

#

Thank you so much for your help! And happy new year!