Registry / devops / metalsmith-webpack

metalsmith-webpack

JSON →
library1.0.3jsnpmunverified

A webpack plugin for Metalsmith, version 1.0.3. This package integrates webpack into the Metalsmith build pipeline, allowing you to process JavaScript bundles as part of your static site generation. It requires both webpack and Metalsmith as peer dependencies. Compared to other build tools, it leverages webpack's full configuration, making it suitable for complex asset pipelines. However, the package is currently unmaintained (last update 2015) and relies on an outdated webpack 1.x API. May still work with modern webpack via compatibility layers, but use caution.

npm install metalsmith-webpack
INSTALL
IMPORT
SIG · METALSMITH-WEBPACK
M
metalsmith-webpack
devopsjavascriptv1.0.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import webpack from 'metalsmith-webpack'
const webpack = require('metalsmith-webpack')
Package uses CommonJS module.exports, so both import and require work, but default export assumed.

Demonstrates basic usage integrating webpack into a Metalsmith build pipeline.

const Metalsmith = require('metalsmith'); const webpack = require('metalsmith-webpack'); const path = require('path'); Metalsmith(__dirname) .use(webpack({ context: path.resolve(__dirname, './src/js/'), entry: './index.js', output: { path: '/js', filename: 'bundle.js' } })) .build((err) => { if (err) throw err; });
Debug
Known issues
breakingRequires webpack 1.x, incompatible with webpack 2+ without adapter.
fix
Use webpack 1.x or fork the package to upgrade.
affects: >=2.0.0
deprecatedPackage has not been updated since 2015; likely abandoned.
fix
Consider alternatives like metalsmith-uglify or manual webpack integration.
affects: >=1.0.0
gotchaOptions object is passed directly to webpack without normalization; some webpack configurations may behave differently.
fix
Refer to webpack 1.x configuration documentation.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'metalsmith-webpack'
Package not installed or not in node_modules.
fix
Run 'npm install metalsmith-webpack' and ensure it's in your dependencies.
TypeError: webpack is not a function
Incorrect import style; package exports a function but may be imported as object.
fix
Use the correct import: const webpack = require('metalsmith-webpack');
Upgrade
Version history
1.0.3latest on npm
Audit
Dependencies
webpackrequiredPeer dependency; the plugin wraps webpack 1.x.
metalsmithrequiredPeer dependency; required as the build framework.
Agent activity
4 hits · last 30 days
node
4
Resources
metalsmith-webpack — npm install metalsmith-webpack · libregistry