From b69ab80fd7ebd6e61467bc3c71f642306ee0fd72 Mon Sep 17 00:00:00 2001 From: Justin Sabelko Date: Thu, 28 Mar 2024 14:57:31 -0500 Subject: [PATCH] Fix javascript sources/mime type error --- app/javascript/application.js | 2 +- config/importmap.rb | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/javascript/application.js b/app/javascript/application.js index 15dc6ae..ee5b919 100644 --- a/app/javascript/application.js +++ b/app/javascript/application.js @@ -5,4 +5,4 @@ import 'jquery-form' import 'jquery-validation' import '@activeadmin/activeadmin' -import './custom/active_admin_custom' +import 'active_admin_custom' diff --git a/config/importmap.rb b/config/importmap.rb index bf3b4a7..fbb8558 100644 --- a/config/importmap.rb +++ b/config/importmap.rb @@ -5,8 +5,10 @@ # ActiveAdmin and dependencies pin "@activeadmin/activeadmin", to: "https://cdn.jsdelivr.net/npm/@activeadmin/activeadmin@2.13.1/app/assets/javascripts/active_admin/base.min.js" -pin "jquery", to: "https://ga.jspm.io/npm:jquery@3.7.0/dist/jquery.js" +pin "jquery", to: "https://cdn.jsdelivr.net/npm/jquery@3.7.0/dist/jquery.js" pin "jquery-ui", to: "https://cdn.jsdelivr.net/npm/jquery-ui@1.13.2/dist/jquery-ui.min.js" pin "jquery-ujs", to: "https://cdn.jsdelivr.net/npm/jquery-ujs@1.2.3/src/rails.min.js" -pin "jquery-validation", to: "https://ga.jspm.io/npm:jquery-validation@1.19.5/dist/jquery.validate.js" -pin "jquery-form", to: "https://ga.jspm.io/npm:jquery-form@4.3.0/dist/jquery.form.min.js" +pin "jquery-validation", to: "https://cdn.jsdelivr.net/npm/jquery-validation@1.19.5/dist/jquery.validate.js" +pin "jquery-form", to: "https://cdn.jsdelivr.net/npm/jquery-form@4.3.0/dist/jquery.form.min.js" + +pin "active_admin_custom", to: "custom/active_admin_custom.js"