
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
babel-plugin-system-import-transformer
Advanced tools
Babel plugin that replaces System.import with the equivalent UMD pattern
Babel plugin that replaces System.import with the equivalent UMD pattern
System.import('./utils/serializer').then(function(module){
console.log(module);
});
to
new Promise(function (resolve, reject) {
var global = window;
if (typeof global.define === 'function' && global.define.amd) {
global.require(['utilsSerializer'], resolve, reject);
} else if (typeof module !== 'undefined' && (module.exports && typeof require !== 'undefined') ||
typeof module !== 'undefined' && (module.component && (global.require && global.require.loader === 'component'))) {
resolve(require('./utils/serializer'));
} else {
resolve(global['utilsSerializer']);
}
}).then(function(module){
console.log(module);
});
npm install babel-plugin-system-import-transformer
Add "system-import-transformer" to your plugins
argument or inside the plugins
options of your Gruntfile
.
babel: {
options: {
plugins: ["system-import-transformer"]
}
}
The babel's getModuleId option (if defined) is used for the AMD and Global Module import.
babel: {
options: {
moduleIds: true,
getModuleId: function(moduleName) {
var files = {
'src/utils/serializer': 'utilsSerializer'
};
return files[moduleName] || moduleName.replace('src/', '');
},
plugins: ['system-import-transformer']
}
}
FAQs
Babel plugin that replaces System.import with the equivalent UMD pattern
The npm package babel-plugin-system-import-transformer receives a total of 18,058 weekly downloads. As such, babel-plugin-system-import-transformer popularity was classified as popular.
We found that babel-plugin-system-import-transformer 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.