
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
rollup-plugin-local-import
Advanced tools
Installation | Configuration | Examples
Rollup plugin for manipulating local
import/exportstatements
rollup-plugin-local-import should be included in development dependencies.
yarn add --dev rollup-plugin-local-import
This plugin is built as native addon and supports following operating systems.
| node14 | node16 | node18 | |
|---|---|---|---|
| Windows x64 | ✓ | ✓ | ✓ |
| Windows x32 | ✓ | ✓ | ✓ |
| macOS x64 | ✓ | ✓ | ✓ |
| macOS arm64 | ✓ | ✓ | ✓ |
| Linux x64 gnu | ✓ | ✓ | ✓ |
| Linux x64 musl | ✓ | ✓ | ✓ |
Support can be extended to cover more systems if needed.
Add plugin in your rollup configuration:
import { defineConfig } from "rollup";
import { localImport } from "rollup-plugin-local-import";
export default defineConfig({
// ...
plugins: [localImport((path) => `${path}.js`)],
});
function localImport(callback: Callback): RollupPlugin;
callback, (path: string) => string, requiredCallback called with each identified local import. Must return string.
function transformLocalImports(path: string): string {
console.log(`Path is "${path}"`);
console.log(`Returning "${path}.js"`);
return `${path}.js`;
}
export default defineConfig({
// ...
plugins: [localImport(transformLocalImports)],
});
> Path is "./Header"
> Returning "./Header.js"
- export { default } from './Header';
+ export { default } from './Header.js';
With localImport(path => path + '.js'):
Input:
export * from "./local-file";
export * from "../file-from-parent-directory";
export * from "some-dependency";
export { a } from "./local-file";
export { b } from "../file-from-parent-directory";
export { c } from "some-dependency";
Output:
export * from "./local-file.js";
export * from "../file-from-parent-directory.js";
export * from "some-dependency"; // Not changed
export { a } from "./local-file.js";
export { b } from "../file-from-parent-directory.js";
export { c } from "some-dependency"; // Not changed
FAQs
Rollup plugin to manipulate local import/export statements
We found that rollup-plugin-local-import 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.

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.