{"id":20230,"library":"nexe-webpack-plugin","title":"nexe-webpack-plugin","description":"Webpack plugin that emits a binary package compiled by nexe, integrating the Nexe JavaScript-to-binary compiler into webpack builds. Current stable version is 0.1.1 with limited release cadence. Key differentiator: allows creating standalone executables from webpack bundles. Requires webpack ^4.0.0 as a peer dependency. Ships TypeScript types. Suitable for developers who need to distribute Node.js applications as single binaries.","status":"active","version":"0.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/fmatzy/nexe-webpack-plugin","tags":["javascript","typescript"],"install":[{"cmd":"npm install nexe-webpack-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add nexe-webpack-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add nexe-webpack-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for plugin functionality","package":"webpack","optional":false}],"imports":[{"note":"Package ships TypeScript types; named export is the correct import. In CommonJS, use destructuring require.","wrong":"const NexePlugin = require('nexe-webpack-plugin')","symbol":"NexePlugin","correct":"import { NexePlugin } from 'nexe-webpack-plugin'"},{"note":"No default export; only named export NexePlugin.","wrong":"import NexePlugin from 'nexe-webpack-plugin'","symbol":"default import","correct":"import { NexePlugin } from 'nexe-webpack-plugin'"},{"note":"If only using type information in TypeScript, prefer type-only import to avoid bundling code.","wrong":"import { NexePlugin } from 'nexe-webpack-plugin' (for type-only usage)","symbol":"type import","correct":"import type { NexePlugin } from 'nexe-webpack-plugin'"}],"quickstart":{"code":"// webpack.config.js\nconst { NexePlugin } = require('nexe-webpack-plugin');\nconst { resolve } = require('path');\n\nmodule.exports = {\n  mode: 'development',\n  entry: './entry.js',\n  output: {\n    path: resolve(__dirname, 'build'),\n  },\n  plugins: [\n    new NexePlugin({\n      output: 'sample-bin',\n    }),\n  ],\n};","lang":"javascript","description":"Configures webpack to use NexePlugin to compile entry.js into a standalone binary sample-bin."},"warnings":[{"fix":"Use webpack 4.x or check for updates that support webpack 5.","message":"NexePlugin requires webpack ^4.0.0 as peer dependency — incompatible with webpack 5.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use named import: import { NexePlugin } from 'nexe-webpack-plugin'.","message":"No default export — attempting import NexePlugin from 'nexe-webpack-plugin' yields undefined.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Consult nexe documentation for prerequisites.","message":"Nexe itself may require additional system dependencies (e.g., build tools) that are not documented in this plugin.","severity":"gotcha","affected_versions":">=0.1.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 -D nexe-webpack-plugin","cause":"Package not installed or missing from node_modules.","error":"Error: Cannot find module 'nexe-webpack-plugin'"},{"fix":"Change to const { NexePlugin } = require('nexe-webpack-plugin');","cause":"Using default import instead of named import.","error":"TypeError: NexePlugin is not a constructor"},{"fix":"Run npm install -D webpack@^4.0.0","cause":"Missing peer dependency webpack.","error":"Error: Cannot find module 'webpack'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}