State of managing assets in new Rails world

1b0973b64704738dbc8ce24d8382bb1f?s=47 Prathamesh
September 29, 2019

State of managing assets in new Rails world

1b0973b64704738dbc8ce24d8382bb1f?s=128

Prathamesh

September 29, 2019
Tweet

Transcript

  1. 1.

    !

  2. 40.
  3. 50.

    // version.js module.exports = { version: ‘1.0’ } // application.js

    var config = require(‘./version.js’) console.log(config.version) @_cha1tanya prathamesh.tech
  4. 61.

    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
  5. 62.

    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 > postcs color-functional-notation > postcss-values-parser > flatten@1.0.2: I wrote this module a very long time ag you 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/actioncable@6.0.0-alpha ├─ @rails/activestorage@6.0.0-alpha ├─ @rails/ujs@6.0.0-alpha ├─ @rails/webpacker@4.0.7 └─ turbolinks@5.2.0 @_cha1tanya prathamesh.tech
  6. 102.
  7. 107.

    ▶ ./bin/webpack-dev-server ℹ 「wds」: Project is running at http://localhost:3035/ ℹ

    「wds」: webpack output is served from /packs/ ℹ 「wds」: Content not from webpack is served from /Users/prathamesh/ Projects/scratch/blog/public/packs ℹ 「wds」: 404s will fallback to /index.html ℹ 「wdm」: Hash: f8c6a1b1755dc32681d6 Version: webpack 4.36.1 Time: 3240ms Built at: 07/23/2019 3:13:42 PM Asset Size Chunks Chunk Names js/application-2d8c7ac24fdd30370b2e.js 504 KiB application [emitted] application js/application-2d8c7ac24fdd30370b2e.js.map 568 KiB application [emitted] application manifest.json 364 bytes [emitted] ℹ 「wdm」: Compiled successfully. @_cha1tanya prathamesh.tech