express-webpack-asset
Middleware to load hashed webpack assets, in combination with https://github.com/kossnocorp/assets-webpack-plugin
Configuration
Example webpack config:
var SaveHashes = ; plugins: path: pathentry: './main.js' output: path: path filename: "bundle-[name]-[hash].js" publicPath: "/app/"
Express config:
var webpackAssets = ;app;
Express-webpack-asset can also support you with multiple json files. For that case you need to pass a path of your assets json files, example of usage:
var webpackAssets = ;app;
Please bear in mind that result of extend will override the object properties with equal names w.r.t. order returned by Nodejs.fs.readDir.
Options
devMode: boolean // Enables development mode which disables caching of the manifest, which is useful when the manifest changes rapidly
Usage
Example webpack-assets.json (taken from the README in the assets-webpack-plugin project):
Two ways of linking in assets. Examples shown linking 'one' asset using express EJS view snippets.