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

date-fns tries to import every JS file in existence #157

Closed
cannikin opened this issue Oct 11, 2024 · 1 comment
Closed

date-fns tries to import every JS file in existence #157

cannikin opened this issue Oct 11, 2024 · 1 comment

Comments

@cannikin
Copy link

I setup my importmap.rb as described in the docs (see below) but when a page loads I'm getting ~300 requests for various date-fns JS files that don't exist:

image

At the bottom of the list are also a bunch from @babel--runtime and @popperjs:

image

Here's my importmap.rb which was the stock Rails 8 template before running bin/importmap pin rbui-js:

# Pin npm packages by running ./bin/importmap

pin "application"
pin "@hotwired/turbo-rails", to: "turbo.min.js"
pin "@hotwired/stimulus", to: "@hotwired--stimulus.js" # @3.2.2
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js"
pin_all_from "app/javascript/controllers", under: "controllers"
pin "rbui-js" # @1.0.0
pin "@babel/runtime/helpers/esm/assertThisInitialized", to: "@babel--runtime--helpers--esm--assertThisInitialized.js" # @7.25.6
pin "@babel/runtime/helpers/esm/classCallCheck", to: "@babel--runtime--helpers--esm--classCallCheck.js" # @7.25.6
pin "@babel/runtime/helpers/esm/createClass", to: "@babel--runtime--helpers--esm--createClass.js" # @7.25.6
pin "@babel/runtime/helpers/esm/createForOfIteratorHelper", to: "@babel--runtime--helpers--esm--createForOfIteratorHelper.js" # @7.25.6
pin "@babel/runtime/helpers/esm/createSuper", to: "@babel--runtime--helpers--esm--createSuper.js" # @7.25.6
pin "@babel/runtime/helpers/esm/defineProperty", to: "@babel--runtime--helpers--esm--defineProperty.js" # @7.25.6
pin "@babel/runtime/helpers/esm/inherits", to: "@babel--runtime--helpers--esm--inherits.js" # @7.25.6
pin "@babel/runtime/helpers/esm/typeof", to: "@babel--runtime--helpers--esm--typeof.js" # @7.25.6
pin "@floating-ui/core", to: "@floating-ui--core.js" # @1.6.8
pin "@floating-ui/dom", to: "@floating-ui--dom.js" # @1.6.11
pin "@floating-ui/utils", to: "@floating-ui--utils.js" # @0.2.8
pin "@floating-ui/utils/dom", to: "@floating-ui--utils--dom.js" # @0.2.8
pin "@kurkle/color", to: "@kurkle--color.js" # @0.3.2
pin "@motionone/animation", to: "@motionone--animation.js" # @10.18.0
pin "@motionone/dom", to: "@motionone--dom.js" # @10.18.0
pin "@motionone/easing", to: "@motionone--easing.js" # @10.18.0
pin "@motionone/generators", to: "@motionone--generators.js" # @10.18.0
pin "@motionone/types", to: "@motionone--types.js" # @10.17.1
pin "@motionone/utils", to: "@motionone--utils.js" # @10.18.0
pin "@popperjs/core", to: "@popperjs--core.js" # @2.11.8
pin "chart.js/auto", to: "chart.js--auto.js" # @4.4.4
pin "date-fns" # @2.30.0
pin "fuse.js" # @7.0.0
pin "hey-listen" # @1.0.8
pin "motion" # @10.18.0
pin "mustache" # @4.2.0
pin "tippy.js" # @6.3.7
pin "tslib" # @2.7.0
@SethHorsley
Copy link
Collaborator

fixed with #162.
try again with main and the installers should work. I'll upload an example repo with the correct importmaps.rb file.

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

2 participants