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.
A dead-simple tool to add import
/ export
ES Module syntax for browserify.
This plugin does the following to your bundler:
.mjs
extension (which takes precedence)"module"
field when "browser"
field is not definedimport
/ export
statements) into CommonJS across your entire bundle (to ensure that ESM authored modules will work)Here's how you use it:
browserify index.js -p esmify > bundle.js
Also works with budo, for example:
budo index.js --live -- -p esmify
The plugin ignores dynamic import expressions and skips files that don't include import
/ export
expressions to maintain performance.
Use npm to install.
npm install esmify --save-dev
Also can be used via API like so:
browserify({
plugin: [
[ require('esmify'), { /* ... options ... */ } ]
]
});
plugin = esmify(bundler, opt = {})
Returns a browswerify plugin function that operates on bundler
with the given options:
mainFields
which describes the order of importance of fields in package.json resolution, defaults to [ 'browser', 'module', 'main' ]
plainImports
(Experimental) this feature will map named imports directly to their CommonJS counterparts, without going through Babel's inter-op functions. This is generally needed for static analysis of fs
, path
and other tools like glslify
in browserify. Defaults to [ 'fs', 'path', 'glslify' ]
.Under the hood, this is using Babel with a couple plugins specific to CommonJS/import/export.
MIT, see LICENSE.md for details.
FAQs
parse and handle import/export for browserify
We found that esmify 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.
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.