
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@apeleghq/esbuild-plugin-inline-js
Advanced tools
npm i -D @apeleghq/esbuild-plugin-inline-js
In the file you have your configuration, first import this plugin
const inlineJs = require('@apeleghq/esbuild-plugin-inline-js');
Or using ES module syntax:
import inlineJs from '@apeleghq/esbuild-plugin-inline-js';
Then, in your esbuild configuration, add inlineJs() to the plugins list. inlineJs optionally takes an object that is passed to esbuild.build, with the exception of the following keys: entryPoints, outdir, outfile and write. Minimal example:
const esbuild = require('esbuild');
const responsiveImages = require('@apeleghq/esbuild-plugin-inline-js');
await esbuild
.build({
entryPoints: ['index.js'],
outdir: 'build',
bundle: true,
format: 'cjs',
plugins: [inlineJs()],
});
Import your inline scripts like this (the extensions supported are inline.js, inline.jsx, inline.ts and inline.tsx):
const inline = require('./foo.inline.js');
// import * as inline from './foo.inline.js';
The import will return something like this:
{
"contentBase64":
"KGZ1bmN0aW9uKCl7cmV0dXJuIkhlbGxvLCBXb3JsZCEifSkoKTsK",
"default":
"(function(){return\"Hello, World!\"})();\n",
"sri": "sha384-PKTF85dF3CsFYaS3tntysCSCAPJBKTcMWuzUmxBG0MTrEJMfMFeNSUo+KQGaqzp3"
}
FAQs
esbuild plugin for inline scripts
We found that @apeleghq/esbuild-plugin-inline-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.