
Security News
Rust RFC Proposes a Security Tab on crates.io for RustSec Advisories
Rustâs crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.
express-webpack-assets
Advanced tools
Middleware to load hashed webpack assets, in combination with https://github.com/kossnocorp/assets-webpack-plugin
Example webpack config:
var SaveHashes = require('assets-webpack-plugin');
plugins: [
new SaveHashes({path: path.join(__dirname, 'config')})
],
entry: './main.js',
output: {
path: path.join(__dirname, '.tmp', 'public', 'app'),
filename: "bundle-[name]-[hash].js",
publicPath: "/app/"
},
Express config:
var webpackAssets = require('express-webpack-assets');
app.use(webpackAssets('./config/webpack-assets.json', {
devMode: true/false
}));
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 = require('express-webpack-assets');
app.use(webpackAssets('./config', {
devMode: true/false
}));
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.
{
devMode: boolean // Enables development mode which disables caching of the manifest, which is useful when the manifest changes rapidly
}
Example webpack-assets.json (taken from the README in the assets-webpack-plugin project):
{
"one": {
"js": "/js/one_2bb80372ebe8047a68d4.bundle.js"
},
"two": {
"js": "/js/two_2bb80372ebe8047a68d4.bundle.js"
}
}
Two ways of linking in assets. Examples shown linking 'one' asset using express EJS view snippets.
<script src="<%= webpack_asset('one', 'js') %>"></script>
<script src="<%= webpack_asset('one').js %>"></script>
FAQs
Middleware for Express.js to load webpack assets
The npm package express-webpack-assets receives a total of 1,562 weekly downloads. As such, express-webpack-assets popularity was classified as popular.
We found that express-webpack-assets demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Rustâs crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.

Security News
/Research
Socket found a Rust typosquat (finch-rust) that loads sha-rust to steal credentials, using impersonation and an unpinned dependency to auto-deliver updates.

Research
/Security Fundamentals
A pair of typosquatted Go packages posing as Googleâs UUID library quietly turn helper functions into encrypted exfiltration channels to a paste site, putting developer and CI data at risk.