You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@gauravtiwari, in order for us to agree on the result, we have to first agree on goals.
Common Goals
React on Rails needs these 2 things:
Minimal requirements put on the webpack config:
Creation of a manifest.json.
Get common Rails/Webpack configuration, like the output directory, from webpackConfigLoader (see below).
stylesheet_pack_tag supports hot reloading (per prior messages).
Migration for React on Rails Apps
In order to make any migration for existing React on Rails users to use Webpacker from Webpacker Lite, I'd suggest the following are mandatory, along with the migration steps for React on Rails apps:
The YAML file for configuration is SIMPLE.
Change the configuration file name from webpacker_lite.yml to webpacker.yml.
Inside the YAML config file:
You may remove the manifest key as the filename of the created manifest must be manifest.json
Change the key webpack_public_output_dir to public_output_path.
Change the Gemfile to point to 'webpacker' from 'webpacker_lite'.
Change the loading of the 'webpackConfigLoader' in your webpack configuration:
I'd really appreciate feedback on rails/webpacker issue #464.
I posted this on June 4, 2017:
@gauravtiwari, in order for us to agree on the result, we have to first agree on goals.
Common Goals
React on Rails needs these 2 things:
webpackConfigLoader
(see below).stylesheet_pack_tag
supports hot reloading (per prior messages).Migration for React on Rails Apps
In order to make any migration for existing React on Rails users to use Webpacker from Webpacker Lite, I'd suggest the following are mandatory, along with the migration steps for React on Rails apps:
webpacker_lite.yml
towebpacker.yml
.manifest
key as the filename of the created manifest must bemanifest.json
webpack_public_output_dir
topublic_output_path
.const webpackConfigLoader = require('react-on-rails/webpackConfigLoader');
const webpackConfigLoader = require('webpacker/webpackConfigLoader');
References from React on Rails
Action Plan
If we can agree on these, my action plan would be:
The text was updated successfully, but these errors were encountered: