_source/handbook/08_installing.md
Turbo can either be referenced in compiled form via the Turbo distributable script directly in the <head> of your application or through npm via a bundler like esbuild.
You can float on the latest release of Turbo using a CDN bundler like jsDelivr. Just include a <script> tag in the <head> of your application:
<head>
<script type="module" src="https://cdn.jsdelivr.net/npm/@hotwired/turbo@latest/dist/turbo.es2017-esm.min.js"></script>
</head>
Or <a href="https://unpkg.com/browse/@hotwired/turbo@latest/dist/">download the compiled packages from unpkg</a>.
You can install Turbo from npm via the npm or yarn packaging tools.
If you using any Turbo functions such as Turbo.visit() import the Turbo functions into your code:
import * as Turbo from "@hotwired/turbo"
If you're not using any Turbo functions such as Turbo.visit() import the library. This avoids issues with tree-shaking and unused variables in some bundlers. See Import a module for its side effects only on MDN.
import "@hotwired/turbo";
The Turbo JavaScript framework is included with the turbo-rails gem for direct use with the asset pipeline.