
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
umd-compat-loader
Advanced tools
Webpack does not like UMD wrappers (this kind of wrapper is generated by TypeScript) of the following:
Webpack does not like UMD wrappers (this kind of wrapper is generated by TypeScript) of the following:
(function (factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
var v = factory(require, exports); if (v !== undefined) module.exports = v;
}
else if (typeof define === 'function' && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
});
It fails to follow the require down the commonjs path so dependencies are not resolved. It's not possible to switch Webpack to use the AMD path with the imports loader as the module
variable is provided by Webpack.
This loader simply removes the UMD wrapper - effectively unwrapping it back to commonjs, the source maps should be remapped accordingly.
If you want to unwrap the UMD wrapper to AMD, provide a query of amd
to the loader. For example: umd-compat-loader?amd=true
;
Experimental support for transforming down emitted imports()
from TS 2.4, allows transforming lazy require statements to other values.
An example of automatically bundling modules as separate chunks:
loader: 'umd-compat-loader',
options: {
imports(module, context) {
const result = path.relative(basePath, path.join(context, module));
return `promise-loader?global,${result}!${module}`;
}
}
FAQs
Webpack does not like UMD wrappers (this kind of wrapper is generated by TypeScript) of the following:
We found that umd-compat-loader 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
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.