• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

shakacode / react_on_rails / 4040
0%

Build:
DEFAULT BRANCH: master
Ran 07 Sep 2017 09:29AM UTC
Jobs 2
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
4040

push

travis-ci

web-flow
React on Rails v9 on rails/webpacker v3 (#908)

* See CHANGELOG.md for summary of changes
* Change webpack-bundle to hello-world-bundle

See https://github.com/shakacode/react-on-rails-v9-rc-generator/pulls
for examples of new generator output.

* Remove gen examples optimizations for spec
  Older optimizations were for times npm was super slow.



  1. Added `config.node_modules_location` which defaults to `""` if Webpacker is installed. You may want to set this to 'client'` to `config/initializers/react_on_rails.rb` to keep your node_modules inside of `/client`
  2. Renamed
   * config.npm_build_test_command ==> config.build_test_command
   * config.build_production_command ==> config.build_production_command

- Update the gemfile. Switch over to using the webpacker gem.

```rb
gem "webpacker"
```

- Update for the renaming in the `WebpackConfigLoader` in your webpack configuration.
  You will need to rename the following object properties:
  - webpackOutputPath      ==> output.path
  - webpackPublicOutputDir ==> output.publicPath
  - hotReloadingUrl        ==> output.publicPathWithHost
  - hotReloadingHostname   ==> settings.dev_server.host
  - hotReloadingPort       ==> settings.dev_server.port
  - hmr                    ==> settings.dev_server.hmr
  - manifest               ==> Remove this one. We use the default for Webpack of manifest.json
  - env                    ==> Use `const { env } = require('process');`
  - devBuild               ==> Use `const devBuild = process.env.NODE_ENV !== 'production';`
 
- Edit your Webpack.config files:
  - Change your Webpack output to be like:
    ```
    const webpackConfigLoader = require('react-on-rails/webpackConfigLoader');
    const configPath = resolve('..', 'config');
    const { output, settings } = webpackConfigLoader(configPath);
    const hmr = settings.dev_server.hmr;
    const devBuild = process.env.NODE_ENV !== 'production';

    output: {
      filename: isHMR ? '[name]-[hash].js' : '[name]-[chunkhash].js',
      chunkFilename: '[name]-[chunkhash].chunk.js',
   
      publicPath: output.publicPath,
      path: output.path,
    },
    ```
  - Change your ManifestPlugin definition to something like the following
    ```
    new ManifestPlugin({
        publicPath: output.publicPath,
        writeToFileEmit: true
      }),

    ```

- Find your `webpacker_lite.yml` and rename it to `webpacker.yml`
  - Consider copying a default webpacker.yml setup such as https://github.com/shakacode/react-on-rails-v9-rc-generator/blob/master/config/webpacker.yml
  - If you are not using the webpacker webpacker setup, be sure to put in `compile: false` in the `default` section.
  - Alternately, if you are updating from webpacker_lite, you can manually change these:
  - Add a default setting
    ```
    cache_manifest: false
    ```
  - For production, set:  
    ```
    cache_manifest: true
    ```
  - Add a section like this under your development env:
    ```
    dev_server:
      host: localhost
      port: 3035
      hmr: false
    ```
    Set hmr to your preference.
  - See the example `spec/dummy/config/webpacker.yml`.
  - Remove keys `hot_reloading_host` and `hot_reloading_enabled_by_default`. These are replaced by the `dev_server` key.
  - Rename `webpack_public_output_dir` to `public_output_path`.
  
- Edit your Procfile.dev
  - Remove the env value WEBPACKER_DEV_SERVER as it's not used
  - For hot loading:
    - Set the `hmr` key in your `webpacker.yml` to `true`.
Jobs
ID Job ID Ran Files Coverage
1 4040.1 (2.3.1, spec/dummy/Gemfile) 07 Sep 2017 09:29AM UTC 0
Travis Job 4040.1
2 4040.2 (2.4.1, spec/dummy/Gemfile) 07 Sep 2017 09:29AM UTC 0
Travis Job 4040.2
Source Files on build 4040
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #4040
  • a333608e on github
  • Prev Build on master (#4020)
  • Next Build on master (#4041)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc