Skip to content

Summary of Changes to Support React on Rails #594

@justin808

Description

@justin808

From a long discussion on #464, this issue will summarize. I'll soon be posting proposed changes to the README.md.

Demo: https://github.com/justin808/webpacker-demo-webpacker_lite-merge

Summary of changes

  1. Move base url out from manifest.json to manifest.rb
  2. Assign env variables to dev server settings so it can be overridden at runtime.
  3. The keys for dev_server should use same format as of now as documented in Paths on the README.md. Note that
  4. hot is a new setting to indicate that the dev_server is used with hot reloading, which means that CSS should be inlined to be hot loaded.
  5. The presence of dev_server means that the webpack-dev-server is used for the given env.
development:
   # put the created files to the /public/webpack/development directory
  public_output_path: webpack/development

 # if dev_server is not provided, then dev_server is not used
 dev_server: 
   hot: true # This is a new setting
   static: false
   host: localhost
   https: false

CC: @gauravtiwari

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions