{"id":25117,"library":"constellate-plugin-compiler-webpack-node","title":"Constellate Webpack Node Compiler Plugin","description":"A Webpack compiler plugin targeting Node.js for Constellate projects. Version 0.14.0, part of the Constellate ecosystem. It integrates Webpack with Node.js builds for Constellate, offering optimized bundling for server-side applications. Differentiates by being purpose-built for Constellate's workflow, using Webpack 5. No indication of release cadence; likely released alongside Constellate updates. Requires @constellates/constellate and webpack as peer dependencies.","status":"active","version":"0.14.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install constellate-plugin-compiler-webpack-node","lang":"bash","label":"npm"},{"cmd":"yarn add constellate-plugin-compiler-webpack-node","lang":"bash","label":"yarn"},{"cmd":"pnpm add constellate-plugin-compiler-webpack-node","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core Constellate framework","package":"@constellates/constellate","optional":false},{"reason":"Webpack compiler","package":"webpack","optional":false}],"imports":[{"note":"ESM default export. CommonJS does not work with default export.","wrong":"const ConstellatePluginCompilerWebpackNode = require('constellate-plugin-compiler-webpack-node')","symbol":"default","correct":"import ConstellatePluginCompilerWebpackNode from 'constellate-plugin-compiler-webpack-node'"},{"note":"Named export matches package name. Default export is deprecated.","wrong":"import ConstellatePluginCompilerWebpackNode from 'constellate-plugin-compiler-webpack-node'","symbol":"ConstellatePluginCompilerWebpackNode","correct":"import { ConstellatePluginCompilerWebpackNode } from 'constellate-plugin-compiler-webpack-node'"},{"note":"TypeScript type import for configuration.","wrong":"","symbol":"PluginConfig","correct":"import type { PluginConfig } from 'constellate-plugin-compiler-webpack-node'"}],"quickstart":{"code":"import ConstellatePluginCompilerWebpackNode from 'constellate-plugin-compiler-webpack-node';\nimport webpack from 'webpack';\n\nconst compiler = new ConstellatePluginCompilerWebpackNode({\n  context: process.cwd(),\n  entry: './src/index.js',\n  output: {\n    path: './dist',\n    filename: 'bundle.js'\n  },\n  target: 'node',\n  mode: 'production'\n});\n\ncompiler.run((err, stats) => {\n  if (err) console.error(err);\n  console.log(stats.toString({ colors: true }));\n});","lang":"typescript","description":"This shows how to create a webpack compiler instance for Node.js using Constellate plugin and run it."},"warnings":[{"fix":"Update webpack to version 5 in your project.","message":"Version 0.14.0 dropped support for webpack 4. Upgrade to webpack 5.","severity":"breaking","affected_versions":">=0.14.0"},{"fix":"Switch to named import: import { ConstellatePluginCompilerWebpackNode } from '...'","message":"Default export is deprecated in favor of named export ConstellatePluginCompilerWebpackNode.","severity":"deprecated","affected_versions":">=0.12.0"},{"fix":"Install @constellates/constellate as a dependency: npm install @constellates/constellate","message":"Plugin requires @constellates/constellate to be installed globally or as a peer dependency.","severity":"gotcha","affected_versions":">=0.10.0"},{"fix":"Set webpack config option target: 'node'","message":"When running in a Node environment, the output target must be set to 'node' for compatibility.","severity":"gotcha","affected_versions":">=0.9.0"},{"fix":"Ensure context is provided in the options object.","message":"Breaking change: the constructor options format changed in 0.13.0. The context property is required.","severity":"breaking","affected_versions":">=0.13.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"npm install @constellates/constellate --save-dev","cause":"Missing peer dependency @constellates/constellate.","error":"Cannot find module '@constellates/constellate'"},{"fix":"Use named import: import { ConstellatePluginCompilerWebpackNode } from '...'","cause":"Using default import incorrectly with CommonJS require.","error":"TypeError: ConstellatePluginCompilerWebpackNode is not a constructor"},{"fix":"Pass a valid options object with entry, output, etc.","cause":"Missing or malformed options passed to the plugin constructor.","error":"Error: webpack configuration must be an object"},{"fix":"npm install webpack@5 --save-dev","cause":"Missing webpack dependency.","error":"Module not found: Error: Can't resolve 'webpack'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}