Skip to content

Proposal to merge in changes from Webpacker Lite. #464

Closed
@justin808

Description

@justin808

Following up from #453 and my discussion with @gauravtiwari, and my article Webpacker Lite: Why Fork Webpacker? and my fork Webpacker Lite.

I'd like to get some consensus on merging in the differences of Webpacker Lite before doing any work on a PR.

YML file and LIVE

Webpacker, from installer file:

development:
   public_output_path: packs
   dev_server:
     host: 0.0.0.0
     port: 8080
     https: false

Webpacker Lite, from README:

development:
  <<: *default
  # generated files for development, in /public/webpack/development
  webpack_public_output_dir: webpack/development
  
  # Default is localhost:3500. You can specify the protocol if needed. Defaults to http://.
  hot_reloading_host: localhost:3500
  
  # Developer note: considering removing this option so it can ONLY be turned by using an ENV value.
  # Default is false, ENV 'HOT_RELOADING' will always override 
  hot_reloading_enabled_by_default: false
  1. Should we use host vs individual keys and nested (note, host should have been hostname in webpacker).
  2. We need an option regarding whether or not using the webpack-dev-server should be the default, so this can be overridden with an env value, like HOT_RELOADING
  3. I'm fine with public_output_path rather than webpack_public_output_dir so long as this is the full path within the public directory where the generated files go, minus the /public part.

Helper differences

  1. Putting minimal in the manifest.json, not putting in the port, host, etc. and putting this logic in the Ruby helper. This minimizes the requirement on a custom Webpack config to the bare minimum mapping of bundle names to file names.
  2. stylesheet_pack_tag uses the hot reload (webpack-dev-server) to decide if CSS should be included because you can't hot reload extracted CSS.
  3. Using the mtime in the FileLoader to account for the chance of using hash in file names for static files, both dev and test env, and the need to get the latest files.

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