
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
rollup-plugin-docker
Advanced tools
A Rollup plugin that wraps
docker-preprocessor.
npm install --save-dev rollup-plugin-docker
rollup-plugin-docker is for tasks that require lots of setup or configuration
of the host machine. A good example is compiling C++ to WebAssembly (wasm),
which requires Emscripten to be compiled, configured, and installed.
This can also be used for multiple times within a configuration for different file types, allowing for easy seperation of concerns via Docker containers.
file.js
import wasmModule from 'file.cpp';
rollup.config.js
import docker from 'rollup-plugin-docker';
import wasmModule from 'rollup-plugin-wasm-module';
export default {
plugins: [
docker({
include: ['**/*.cpp'],
options: {
image: 'apiaryio/emcc',
createOptions: {
Binds: ['/:/host'],
},
command: path => [
'sh',
'-c',
`
emcc \
/host${path} \
-g \
-Os \
-s WASM=1 \
-s SIDE_MODULE=1 \
-o target.wasm \
;
`,
],
paths: {
main: '/src/target.wasm',
emittedFiles: [
'/src/target.wast',
],
sourceMap: '/src/target.wasm.map',
},
},
}),
wasmModule({
include: ['**/*.cpp', '**/*.rs'],
}),
],
};
All options are defined by and are passed directly to
docker-preprocessor; check its documentation for more a
in-depth explanation.
FAQs
A Rollup plugin that wraps docker-preprocessor.
We found that rollup-plugin-docker 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.