Skip to content

Add precompile hook #491

@justin808

Description

@justin808

Sometimes, we always want to run some code, like

rake react_on_rails:generate_packs

whenever about to run webpack

We can add a shakapacker.yml configuration so some code can run before invoking the webpack.

precompile_hook: rake react_on_rails:generate_packs

This way, "it just works" in terms of having some files ready that React on Rails needs.

Alternatives:

  • While we could modify the installed bin files, that can make upgrades trickier
  • We could wrap the bin files with new scripts.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions