
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
inline-import
Advanced tools
A tool that inlines custom file imports.
Instead of loading external files during runtime, you may wish to integrate the raw file contents directly into your
JavaScript files during build time. This tool allows you to use the native import syntax to include any data:
import data from "./data.png";
The type of the imported file can be anything. You only need to specify a preferred encoding for each file type.
npm install inline-import
The command line tool can be invoked using the inline-import command. It requires a configuration in which the
source paths and the options are specified. You can decide whether you want to provide the configuration
via package.json or as a standalone file.
If there is no configuration in package.json, the tool will look for a configuration file with the
default name .inline-import.json in the current working directory.
inline-import -c config/inline-import.json
Affected files will automatically be copied into a backup directory before they are modified.
You can restore the original files by using the --restore option.
| Option | Shorthand | Description |
|---|---|---|
| --config | -c | Specifies an alternative config path |
| --backup | -b | Only copies files into a backup directory |
| --restore | -r | Restores files from the backup directory |
The immediate inlining process is destructive. Affected files will be changed permanently.
To inline your file imports, you need to specify the path to the JavaScript
file that should be modified. Additionally, you need to define the
extensions of the relevant import statements.
hello world
import component from "module";
import text from "./text.txt";
import InlineImport from "inline-import";
InlineImport.transform("index.js", {
extensions: {
".txt": "utf8"
}
}).then(modified => {
console.log(modified ? "Success!" : "Nothing changed");
}).catch(console.error);
import component from "module";
const text = "hello world";
src. Glob patterns are supported.backup path may be specified. The default path is .backup.encoding for the JavaScript files that will be processed.
Use one of the possible encoding values specified in node's Buffer class.
The default encoding is utf8.extensions will be considered. Each extension must define its own encoding.useVar to true.{
"src": ["src/**/*.js"],
"backup": "path/to/backup",
"encoding": "utf8",
"useVar": true,
"extensions": {
".html": "utf8",
".png": "base64"
}
}
{
"inlineImport": {
"src": "src/**/*.js",
"extensions": {}
}
}
InlineImport.transform(filePath, {
encoding: "utf8",
useVar: true,
extensions: {}
}).catch(e => console.error(e));
Maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
FAQs
A tool for inlining file imports.
The npm package inline-import receives a total of 38 weekly downloads. As such, inline-import popularity was classified as not popular.
We found that inline-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
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.