10
10
After reading this guide, you will know:
11
11
12
12
* How to use Rails without the need for a Node.js, Yarn, or a JavaScript bundler.
13
- * How to create a new Rails application using import maps, bun , esbuild, rollup , or webpack to bundle
13
+ * How to create a new Rails application using import maps, Bun , esbuild, Rollup , or Webpack to bundle
14
14
your JavaScript.
15
15
* What Turbo is, and how to use it.
16
16
* How to use the Turbo HTML helpers provided by Rails.
@@ -68,9 +68,9 @@ Adding npm Packages with JavaScript Bundlers
68
68
Import maps are the default for new Rails applications, but if you prefer traditional JavaScript
69
69
bundling, you can create new Rails applications with your choice of
70
70
[ Bun] ( https://bun.sh ) , [ esbuild] ( https://esbuild.github.io/ ) ,
71
- [ webpack ] ( https://webpack.js.org/ ) , or [ rollup .js] ( https://rollupjs.org/guide/en/ ) .
71
+ [ Webpack ] ( https://webpack.js.org/ ) , or [ Rollup .js] ( https://rollupjs.org/guide/en/ ) .
72
72
73
- To use a bundler instead of import maps in a new Rails application, pass the ` — javascript` or ` -j `
73
+ To use a bundler instead of import maps in a new Rails application, pass the ` -- javascript` or ` -j `
74
74
option to ` rails new ` :
75
75
76
76
``` bash
@@ -87,7 +87,7 @@ development.
87
87
88
88
### Installing a JavaScript Runtime
89
89
90
- If you are using a esbuild, rollup .js or Webpack, to bundle your JavaScript in
90
+ If you are using esbuild, Rollup .js, or Webpack to bundle your JavaScript in
91
91
your Rails application, Node.js and Yarn must be installed. If you are using
92
92
Bun, then you just need to install Bun as it is both a JavaScript runtime and a bundler.
93
93
@@ -103,11 +103,11 @@ $ bun --version
103
103
The version of your Bun runtime should be printed out. If it says something
104
104
like ` 1.0.0 ` , Bun has been installed correctly.
105
105
106
- If not, you may need to reinstall bun in the current directory or restart your terminal.
106
+ If not, you may need to reinstall Bun in the current directory or restart your terminal.
107
107
108
108
#### Installing Node.js and Yarn
109
109
110
- If you are using esbuild, rollup .js or Webpack you will need Node.js and Yarn.
110
+ If you are using esbuild, Rollup .js, or Webpack you will need Node.js and Yarn.
111
111
112
112
Find the installation instructions at the [ Node.js website] ( https://nodejs.org/en/download/ ) and
113
113
verify it’s installed correctly with the following command:
0 commit comments