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
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
NexePlugin
✓ import { NexePlugin } from 'nexe-webpack-plugin'
✗ const NexePlugin = require('nexe-webpack-plugin')
Package ships TypeScript types; named export is the correct import. In CommonJS, use destructuring require.
default import
✓ import { NexePlugin } from 'nexe-webpack-plugin'
✗ import NexePlugin from 'nexe-webpack-plugin'
No default export; only named export NexePlugin.
type import
✓ import type { NexePlugin } from 'nexe-webpack-plugin'
✗ import { NexePlugin } from 'nexe-webpack-plugin' (for type-only usage)
If only using type information in TypeScript, prefer type-only import to avoid bundling code.
Configures webpack to use NexePlugin to compile entry.js into a standalone binary sample-bin.
// webpack.config.js
const { NexePlugin } = require('nexe-webpack-plugin');
const { resolve } = require('path');
module.exports = {
mode: 'development',
entry: './entry.js',
output: {
path: resolve(__dirname, 'build'),
},
plugins: [
new NexePlugin({
output: 'sample-bin',
}),
],
};
Errors
Common errors & fixes
Error: Cannot find module 'nexe-webpack-plugin'
Package not installed or missing from node_modules.
fixRun npm install -D nexe-webpack-plugin
TypeError: NexePlugin is not a constructor
Using default import instead of named import.
fixChange to const { NexePlugin } = require('nexe-webpack-plugin'); Error: Cannot find module 'webpack'
Missing peer dependency webpack.
fixRun npm install -D webpack@^4.0.0
Audit
Dependencies
webpackrequiredpeer dependency required for plugin functionality