forked from hotwired/turbo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import
session
instead of reading window.Turbo.session
Follow-up to [hotwired#1049][] Follow-up to [hotwired#1073][] Related to [hotwired#1078][] Replace an internal `window.Turbo.session` access with an `import { session }` statement. Prior attempts at this change introduced circular dependencies. This attempt does not. Additionally, this change maintains the ability for consumers to access StreamActions through `window.Turbo.StreamActions`, while also enabling `import { StreamActions } from "@hotwired/turbo"` (or `from "@hotwired/turbo-rails"`). [hotwired#1049]: hotwired#1049 [hotwired#1073]: hotwired#1073 [hotwired#1078]: hotwired#1078
- Loading branch information
1 parent
bd974ba
commit 04978a4
Showing
3 changed files
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
import "./polyfills" | ||
import "./elements" | ||
import "./script_warning" | ||
import { StreamActions } from "./core/streams/stream_actions" | ||
|
||
import * as Turbo from "./core" | ||
|
||
window.Turbo = Turbo | ||
window.Turbo = { ...Turbo, StreamActions } | ||
Turbo.start() | ||
|
||
export { StreamActions } | ||
export * from "./core" | ||
export * from "./elements" | ||
export * from "./http" |