express-hash-webpack
Webpack asset pipeline helpers for ExpressJS.
This middleware adds asset helpers for dealing with Webpack assets when using the hash-webpack-plugin plugin.
Setup
npm instal --save express-hash-webpack
Example
// server.js (Express app)var app = ; app;app; app;
// layout.jade (dynamic view)doctype htmlhtml(lang="en") head title= pageTitle body h3 Assets available at #{assetPath('index.js')}. block body script(type='text/javascript', src=assetPath('index.js'))
Config
hashPath: String | Function
Path to the assets hash file directory.
hashFileName: String | Function
Name of the hash file name.
hashTemplate: String | Function
Hash value template.
assetTemplate: String | Function
Asset full path template.
cache: Boolean
Cache results (default to tru in production).