Skip to content

How to register a new admin WebComponent? #3265

Answered by tvdeyen
mbajur asked this question in Q&A
Discussion options

You must be logged in to vote

Alchemy uses importmap-rails to handle JS imports.

We have two configurations that allow you to either add a single import

  1. # Additional JS modules to be imported in the Alchemy admin UI
    #
    # Be sure to also pin the modules with +Alchemy.importmap+.
    #
    # == Example
    #
    # Alchemy.importmap.pin "flatpickr/de",
    # to: "https://ga.jspm.io/npm:flatpickr@4.6.13/dist/l10n/de.js"
    #
    # Alchemy.admin_js_imports << "flatpickr/de"
    #
    def admin_js_imports
    @_admin_js_imports ||= Set.new
    end

or add your own bundle with

  1. alchemy_cms/lib/alchemy.rb

    Lines 92 to 117 in e4aba31

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mbajur
Comment options

@tvdeyen
Comment options

@mbajur
Comment options

@tvdeyen
Comment options

Answer selected by mbajur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants