mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Update guides/source/webpacker.md
Co-authored-by: Matheus Richard <matheusrichardt@gmail.com>
This commit is contained in:
parent
3cf42d7adc
commit
337ed94732
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ Rails also ships with Sprockets, an asset-packaging tool whose features overlap
|
||||||
|
|
||||||
Sprockets, which was designed to be used with Rails, is somewhat simpler to integrate. In particular, code can be added to Sprockets via a Ruby gem. However, webpack is better at integrating with more current JavaScript tools and NPM packages and allows for a wider range of integration. New Rails apps are configured to use webpack for JavaScript and Sprockets for CSS, although you can do CSS in webpack.
|
Sprockets, which was designed to be used with Rails, is somewhat simpler to integrate. In particular, code can be added to Sprockets via a Ruby gem. However, webpack is better at integrating with more current JavaScript tools and NPM packages and allows for a wider range of integration. New Rails apps are configured to use webpack for JavaScript and Sprockets for CSS, although you can do CSS in webpack.
|
||||||
|
|
||||||
You should choose Webpacker over Sprockets on a new project if you want to use NPM packages or want access to the most current JavaScript features and tools. You should choose Sprockets over Webpacker for legacy applications where migration might be costly, if you want to integrate using Gems, or if you have a very small amount of code to package.
|
You should choose Webpacker over Sprockets on a new project if you want to use NPM packages and/or want access to the most current JavaScript features and tools. You should choose Sprockets over Webpacker for legacy applications where migration might be costly, if you want to integrate using Gems, or if you have a very small amount of code to package.
|
||||||
|
|
||||||
If you are familiar with Sprockets, the following guide might give you some idea of how to translate. Please note that each tool has a slightly different structure, and the concepts don't directly map onto each other.
|
If you are familiar with Sprockets, the following guide might give you some idea of how to translate. Please note that each tool has a slightly different structure, and the concepts don't directly map onto each other.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue