Skip to content

Commit

Permalink
Merge pull request #3164 from projectblacklight/revert-relative-import
Browse files Browse the repository at this point in the history
Revert "all imports should be relative, so individual files can still…
  • Loading branch information
jcoyne authored Jun 3, 2024
2 parents b15f56f + 5f847ec commit b200520
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/javascript/blacklight/bookmark_toggle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import CheckboxSubmit from './checkbox_submit.js'
import CheckboxSubmit from 'blacklight/checkbox_submit'

const BookmarkToggle = (e) => {
if (e.target.matches('[data-checkboxsubmit-target="checkbox"]')) {
Expand Down
15 changes: 5 additions & 10 deletions app/javascript/blacklight/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
// ALL imports in this dir, including in files imported, should be RELATIVE
// paths to keep things working in the various ways these files get used, at
// both compile time and npm package run time.

import BookmarkToggle from './bookmark_toggle.js'
import ButtonFocus from './button_focus.js'
import Modal from './modal.js'
import SearchContext from './search_context.js'
import Core from './core.js'

import BookmarkToggle from 'blacklight/bookmark_toggle'
import ButtonFocus from 'blacklight/button_focus'
import Modal from 'blacklight/modal'
import SearchContext from 'blacklight/search_context'
import Core from 'blacklight/core'

export default {
BookmarkToggle,
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/blacklight/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
can be a turbo-stream that defines some HTML fragementsand where on the page to put them:
https://turbo.hotwired.dev/handbook/streams
*/
import ModalForm from './modalForm.js'
import ModalForm from 'blacklight/modalForm'

const Modal = (() => {
const modal = {}
Expand Down

0 comments on commit b200520

Please sign in to comment.