Closed
Description
I know importmap-rails
is not meant to be used with package.json
but hear me out..
I'm all in favor of ditching the JS build step which complicates things a lot. But I would also like to have proper dependency management for JS. I don't think these exclude each other. I think the principles of importmaps work just fine with package.json
, the example in the readme says as much: import React from "./node_modules/react"
Those of us who are ok with having yarn or npm installed could have the best of both worlds:
- get all the benefits of a proper dependency manager like integrity checks and proper versioning
- bunch of tooling relies on package.json, like auto-creating dependency update PRs
- no need to commit dependencies (for security Serving JS files from /vendor is insecure #275 and bad practice)
- no need to use CDN (security Security: verify integrity of pinned resources? #122 and wanting a self-contained app)
- familiarity, step-by-step migration
All my issues would be solved by: pin 'tom-select', to: 'node_modules/tom-select/dist/esm/tom-select.complete.js'
Is this possible? Is there a reason why this can't be an option?
Metadata
Metadata
Assignees
Labels
No labels