Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

State of managing the assets in new Rails world

State of managing the assets in new Rails world

Presentation given at RubyFuza 2020

You can find more resources about the talk here - https://prathamesh.tech/webpacker-on-rails/

Prathamesh Sonpatki

February 07, 2020
Tweet

More Decks by Prathamesh Sonpatki

Other Decks in Programming

Transcript

  1. A Ruby conference without JavaScript is not a Ruby Conference

    Prathamesh Sonpatki 07/02/2020 @_cha1tanya prathamesh.tech
  2. modules: [ "node_modules", path.resolve(__dirname, "app") ], // directories where to

    look for modules extensions: [".js", ".json", ".jsx", ".css"], // extensions that are used alias: { // a list of module name aliases "module": "new-module", // alias "module" -> "new-module" and "module/path/file" -> "new-module/ file" "only-module$": "new-module", // alias "only-module" -> "new-module", but not "only-module/path/file" "new-module/path/file" "module": path.resolve(__dirname, "app/third/module.js"), // alias "module" -> "./app/third/module.js" and "module/file" results i // modules aliases are imported relative to the current context }, /* Alternative alias syntax (click to show) */ /* Advanced resolve configuration (click to show) */ }, @_cha1tanya prathamesh.tech
  3. rails webpacker:install create config/webpacker.yml Copying webpack core config create config/webpack

    create config/webpack/development.js create config/webpack/environment.js create config/webpack/production.js create config/webpack/test.js @_cha1tanya prathamesh.tech
  4. yarn add v1.17.3 info No lockfile found. [1/4] Resolving packages...

    ⠁ @rails/actioncable@^6.0.0-alpha warning @rails/webpacker > postcss-preset-env > postcss-color-functional-notat postcss-values-parser > [email protected]: I wrote this module a very long time ag should use something else. [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Saved lockfile. success Saved 602 new dependencies. info Direct dependencies ├─ @rails/[email protected] ├─ @rails/[email protected] ├─ @rails/[email protected] ├─ @rails/[email protected] └─ [email protected] @_cha1tanya prathamesh.tech