You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import '@babel/polyfill';
import { Application } from 'stimulus';
import { definitionsFromContext } from 'stimulus/webpack-helpers';
import Turbo from '@hotwired/turbo';
const application = Application.start();
const context = require.context('./controllers', true, /\.js$/);
application.load(definitionsFromContext(context));
only as a reference to the question below:
This is purely a suggestion on a "meta level" and not a specific and detailed PR on the docs.
Is there any dependencies on babel libraries or similar, that is needed for Turbo to run? if yes, could such be added to the documentation? Is this a misconfiguration on my end (chances are good - still stepping into new waters on webpack and babel topics) could the installing page display any known human errors?
I like the hotwired approach and is spending my christmas holidays moving from static-static PHP to a hotwired PHP application :)
The text was updated successfully, but these errors were encountered:
Hi and thank you for this christmas present :-D
I've been using Turbolinks before - so this is my reference and "knowledge base" on the Turbo concept :)
I followed the installation note from https://turbo.hotwire.dev/handbook/installing and added
@hotwired/turbo
and addedto my .js entry file.
This resolved in a referenceError being thrown in the inspector as seen here
Thanks to this StackOverflow question/answer i found a missing
@babel/polyfill
library was needed.Adding that with yarn and add
import '@babel/polyfill';
to the top of my entry .js file, turbo now works as used to from Turbolinks :)My package.json
dependencies
block looks like this at currentand my entry .js file like this
only as a reference to the question below:
This is purely a suggestion on a "meta level" and not a specific and detailed PR on the docs.
Is there any dependencies on babel libraries or similar, that is needed for Turbo to run? if yes, could such be added to the documentation? Is this a misconfiguration on my end (chances are good - still stepping into new waters on webpack and babel topics) could the installing page display any known human errors?
I like the hotwired approach and is spending my christmas holidays moving from static-static PHP to a hotwired PHP application :)
The text was updated successfully, but these errors were encountered: