Comments (6)
Does this "fix" it?
- import { Turbo, cable } from "@hotwired/turbo-rails"
+ import "@hotwired/turbo-rails"
from turbo-rails.
Sounds like Webpack is shaking its tree and not finding any usages of Turbo in the pack itself. @javan any idea how we might stop this from happening? Maybe with Webpack we shouldn't have the lib call start() itself.
from turbo-rails.
I'm experiencing the same with webpacker 5.1.1. To get around it I've added a Turbo.start()
call after the import, as it looks like this should have no effect beyond persuading Webpack to keep Turbo
in the tree.
I'm only using javascript_pack_tag
, not javascript_packs_with_chunks_tag
.
from turbo-rails.
Does this "fix" it?
- import { Turbo, cable } from "@hotwired/turbo-rails" + import "@hotwired/turbo-rails"
Yes, this works fine.
from turbo-rails.
Yeah that worked for me under Webpacker 6 beta also.
from turbo-rails.
Thanks, same for vite
For Turbo itself, this was not necessary, but ActionCable only worked in this way.
from turbo-rails.
Related Issues (20)
- Mixed Content Error with Turbo Drive
- OT: Attackers might be trying to steal your information from discuss.hotwire.dev HOT 2
- Turbo refresh can hijack user navigation HOT 3
- import "@hotwired/turbo-rails" errors HOT 1
- Using data-turbo-confirm on plain (non-form) buttons HOT 3
- Adding stimulus breaks a test HOT 1
- how do you install turboframes into a rails 5 project that migrated to rails 7 using only sprockets (skipping all the webpack & 6 bs)? HOT 2
- What are the controls effected before injecting `text/vnd.turbo-stream.html`?
- turbo_stream.remove_all Not generating proper selector for targets.
- idiomorph merges attributes on `<turbo-cable-stream-source>` and `connectedCallback()` doesn't run HOT 2
- Add morph to StreamActions HOT 5
- how do I batch multiple turbo stream broadcasts?
- <turbo-cable-stream-source> tag can affect visual layout HOT 1
- broadcast_update_to partial should be smarter and extract the inner_html, it feels like a bug
- Turbo not loading on Safari in production HOT 1
- Any Security Constraints to turbo_method: 'post' functionality?
- using the view transitions API? HOT 1
- Unable to render layouts when using inline turbo stream responses
- 8.0.5: cdn (and thus importmap pins) has broken import paths "CbGBsmqA.js" instead of cable.js
- Turbo Frame + Nginx Cache + data-action-advance
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from turbo-rails.