Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
nmf-webpack-loader
Advanced tools
This loader parses your .nmf file, searches for "url" occurences, copies
the assets into the output directory, replaces the url with the outputted path,
recompiles the .nmf JSON structure and returns a data url (e.g. data:application/x-pnacl,{"program":...
).
npm install nmf-loader --save-dev
webpack config:
module.exports = {
module: {
loaders: [{
test: /\.nmf$/,
loader: 'nmf',
query: {
name: '[name].[hash:6].[ext]'
}
}, {
test: /\.((nexe)|(pexe)|(so))$/, // will load .nexe, .pexe and .so files with file-loader
loader: 'file-loader',
query: {
name: '[name].[hash:6].[ext]'
}
}]
},
};
Example .nmf file, my-nativeclient.nmf
:
{
"program": {
"portable": {
"pnacl-translate": {
"url": "./my-native-app.pexe"
}
}
}
}
In your application:
const nmf = require('./my-nativeclient.nmf');
const embed = document.createElement('embed');
embed.setAttribute('src', nmf);
embed.setAttribute('width', 0);
embed.setAttribute('height', 0);
embed.setAttribute('type', 'application/x-pnacl');
document.body.appendChild(embed);
The loader replaces every occurence of {"url": "[some nacl file url]"}
with the actual URL of the file, including public path and/or a hash in the filename. The NaCl file will also be copied into the project's output directory.
npm test
Apache 2.0
FAQs
A Webpack loader for Native Client manifests
The npm package nmf-webpack-loader receives a total of 0 weekly downloads. As such, nmf-webpack-loader popularity was classified as not popular.
We found that nmf-webpack-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.