Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES6 version of the clerk.browser.js #5

Open
fagiani opened this issue Apr 4, 2023 · 0 comments
Open

ES6 version of the clerk.browser.js #5

fagiani opened this issue Apr 4, 2023 · 0 comments

Comments

@fagiani
Copy link

fagiani commented Apr 4, 2023

Hello there,

I really appreciate your efforts to get this Rails starter for Clerk!

With Rails 7 release, there is a importmap approach that will not require npm or yarn nor webpacker gem to transpile code. Also, instead of sprockets, we can now use propshaft which is much simpler.

The current version loads a plain javascript version that relies on a window.Clerk declaration and requires an extra bit of code that could be potentially removed... e.g. the excerpts below:

https://github.com/clerkinc/clerk-rails-starter/blob/9824483bcd7592d5dbfd007a9260831b793d2f7d/app/helpers/application_helper.rb#L2-L15

https://github.com/clerkinc/clerk-rails-starter/blob/9824483bcd7592d5dbfd007a9260831b793d2f7d/app/javascript/packs/clerk.js#L1-L3

Is there a ES6 version of clerk.browser.js that could be used in order to leverage that?

Keep rocking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant