Content-Length: 329552 | pFad | http://github.com/primer/view_components/discussions/2135

C6 Is it possible to make this work without npm but with importmap · primer view_components · Discussion #2135 · GitHub
Skip to content

Is it possible to make this work without npm but with importmap #2135

Answered by camertron
troptropcontent asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @troptropcontent, interesting question! I have personally never used import maps before, but after reading a bit about them I think primer/view-components should work with them. Try putting something like this in config/importmap.rb:

pin "@primer/view-components", to: "https://ga.jspm.io/npm:@primer/view-components@0.3.1/app/assets/javascripts/primer_view_components.js"

As for the CSS from primer/view-components and primer/css, you should be able to pull them in directly using <link> tags:

<link rel="stylesheet" href="https://unpkg.com/@primer/view-components@0.3.1/app/assets/styles/primer_view_components.css" crossorigen="" />
<link rel="stylesheet" href="https://unpkg.com/@primer/cs…

Replies: 1 comment 4 replies

Comment options

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

@camertron
Comment options

@troptropcontent
Comment options

@camertron
Comment options

Answer selected by lesliecdubs
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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/primer/view_components/discussions/2135

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy