express-webpack-assets-tracker
hashed webpack assets tracker
Last updated 6 years ago by tinkgu .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install express-webpack-assets-tracker 
SYNC missed versions from official npm registry.

express-webpack-assets-tracker

please pre-install assets-webpack-plugin.

Usage

webpack-assets.json

{"dashboard":{"js":"/public/scripts/dashboard-6dce253bc98e98a0d87c.js","css":"/public/styles/dashboard-6dde253bc98e98a0d87c.css"}}

express, app.js

var path = require('path');
var assets = require('express-webpack-assets-tracker');

app.use(assets(path.resolve('./webpack-assets.json')))

ejs, index.html

<link rel="stylesheet" href="<%- webpack_asset.webpack_entry_name.css %>">
<script src="<%- webpack_assets.webpack_entry_name.js %>"></script>

output

<link rel="stylesheet" href="/public/styles/dashboard-6dde253bc98e98a0d87c.css">
<script src="/public/scripts/dashboard-6dce253bc98e98a0d87c.js"></script>

Note

  • readFileSync
  • NO TEST!

Current Tags

  • 1.0.0                                ...           latest (6 years ago)

1 Versions

  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2021 © npmmirror.com |