Your webpack.config.js should produce a manifest as build/manifest.json
:
const ManifestPlugin = require('webpack-manifest-plugin')
module.exports = {
..
output: {
path: __dirname + '/build',
...
},
...
plugins: [
...
new ManifestPlugin()
]
}
In your Fermo build/0
, run the Webpack asset pipeline:
def build do
...
config = FermoHelpers.Assets.build(config)
...
end
You can then use these helpers,
such as javascript_include_tag
, and you will pick up the
correctly hashed filenames.
javascript_include_tag/n
current_datetime/1
datetime_to_rfc2822/1
strftime/2
Note: If you want to use current_datetime/1
, you need to include
the following dependency:
{:tzdata, "~> 1.0"}
and add a config option
config :elixir, :time_zone_database, Tzdata.TimeZoneDatabase