{"id":20207,"library":"metalsmith-webpack","title":"metalsmith-webpack","description":"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.","status":"abandoned","version":"1.0.3","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/christophercliff/metalsmith-webpack","tags":["javascript","metalsmith","webpack"],"install":[{"cmd":"npm install metalsmith-webpack","lang":"bash","label":"npm"},{"cmd":"yarn add metalsmith-webpack","lang":"bash","label":"yarn"},{"cmd":"pnpm add metalsmith-webpack","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; the plugin wraps webpack 1.x.","package":"webpack","optional":false},{"reason":"Peer dependency; required as the build framework.","package":"metalsmith","optional":false}],"imports":[{"note":"Package uses CommonJS module.exports, so both import and require work, but default export assumed.","wrong":"const webpack = require('metalsmith-webpack')","symbol":"default","correct":"import webpack from 'metalsmith-webpack'"}],"quickstart":{"code":"const Metalsmith = require('metalsmith');\nconst webpack = require('metalsmith-webpack');\nconst path = require('path');\n\nMetalsmith(__dirname)\n  .use(webpack({\n    context: path.resolve(__dirname, './src/js/'),\n    entry: './index.js',\n    output: {\n      path: '/js',\n      filename: 'bundle.js'\n    }\n  }))\n  .build((err) => {\n    if (err) throw err;\n  });","lang":"javascript","description":"Demonstrates basic usage integrating webpack into a Metalsmith build pipeline."},"warnings":[{"fix":"Use webpack 1.x or fork the package to upgrade.","message":"Requires webpack 1.x, incompatible with webpack 2+ without adapter.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Consider alternatives like metalsmith-uglify or manual webpack integration.","message":"Package has not been updated since 2015; likely abandoned.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Refer to webpack 1.x configuration documentation.","message":"Options object is passed directly to webpack without normalization; some webpack configurations may behave differently.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install metalsmith-webpack' and ensure it's in your dependencies.","cause":"Package not installed or not in node_modules.","error":"Cannot find module 'metalsmith-webpack'"},{"fix":"Use the correct import: const webpack = require('metalsmith-webpack');","cause":"Incorrect import style; package exports a function but may be imported as object.","error":"TypeError: webpack is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}