Skip to content

Asset revisioning (long-term caching) #1817

Closed
@exoszajzbuk

Description

@exoszajzbuk

I'd like to know if it'd be possible to add asset revisioning feature with angular-cli@webpack. As far as I see chunk hashes are only added to .js files during --prod build and are used in the generated index.html

I can think of two possible approaches:

  1. The rewrite approach, e.g. https://github.com/smysnk/gulp-rev-all which parses the asset references (considering dependencies) than does re-writing in raw asset files. This would not require using custom helpers in templates/styles.
  2. The manifest approach, e.g. https://github.com/nickjj/manifest-revision-webpack-plugin which will populate a manifest file with raw => revisioned mapping. Using helpers in templates/styles could be used for determining the right asset to use.

angular-cli: 1.0.0-beta.11-webpack.2
node: 6.2.2
os: darwin x64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions