@hotwired/turbo-rails
Advanced tools
Comparing version 7.0.0-beta.5 to 7.0.0-beta.6
let consumer | ||
export async function getConsumer() { | ||
if (consumer) return consumer | ||
const { createConsumer } = await import("@rails/actioncable/src") | ||
return setConsumer(createConsumer()) | ||
return consumer || setConsumer(createConsumer().then(setConsumer)) | ||
} | ||
@@ -13,2 +11,7 @@ | ||
export async function createConsumer() { | ||
const { createConsumer } = await import(/* webpackChunkName: "actioncable" */ "@rails/actioncable/src") | ||
return createConsumer() | ||
} | ||
export async function subscribeTo(channel, mixin) { | ||
@@ -15,0 +18,0 @@ const { subscriptions } = await getConsumer() |
{ | ||
"name": "@hotwired/turbo-rails", | ||
"version": "7.0.0-beta.5", | ||
"version": "7.0.0-beta.6", | ||
"description": "The speed of a single-page web application without having to write any JavaScript", | ||
@@ -16,4 +16,4 @@ "module": "app/javascript/turbo/index.js", | ||
"dependencies": { | ||
"@hotwired/turbo": "^7.0.0-beta.4", | ||
"@rails/actioncable": "^6.1.0" | ||
"@hotwired/turbo": "^7.0.0-beta.6", | ||
"@rails/actioncable": "^6.0.0" | ||
}, | ||
@@ -20,0 +20,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112391
3391
Updated@rails/actioncable@^6.0.0