Webpack Config Generator
Generate a minimal webpack.config.js.
The minimum webpack skeleton that builds
Webpack does nothing useful until a webpack.config.js exists, and the official docs open with concepts when all you wanted was a skeleton to adapt. The predictable outcome: you copy a snippet from a 2019 blog post, it uses an option that was renamed in version 5, and the build dies with a message that points nowhere useful.
What comes out is the functional minimum: entry at src/index.js, output to dist/bundle.js built with path.resolve, mode production and two loader rules. One sends .js files outside node_modules through babel-loader, the other runs .css through css-loader and style-loader. That pair is applied right to left, and swapping the order breaks the build. There are no fields to edit; the button always returns the same text.
Before running it, install webpack, webpack-cli, babel-loader with @babel/core and @babel/preset-env, plus style-loader and css-loader, and add a babel.config.js. Production mode already enables minification and tree shaking; for local work switch to development and add devtool source-map. Missing here are devServer and HtmlWebpackPlugin, which most real projects end up wanting. Generation runs in the browser.
Frequently asked questions
Why is my CSS missing from the bundle?
Do I still need webpack?
How do I get a development build?
Related Tools
Rollup Config Generator
Generates a rollup.config.js to bundle libraries as ESM and CommonJS, with the node-resolve, commonjs and terser plugins already wired. A fixed block, ready to tweak.
esbuild Config Generator
Generates a ready esbuild.config.js for fast builds, with entry point, bundle, minification, sourcemap and target already set. The output format is left at the esbuild default.
Prisma Init Generator
Generate an initial schema.prisma.
Mongoose Init Generator
Generate the Mongoose connection to MongoDB plus a sample schema, ready to drop into your Node.js project. Start modeling your data in seconds.
Drizzle Init Generator
Generates a drizzle.config.ts for the Drizzle ORM with the PostgreSQL dialect, ready for migrations. Copy the file and set up your type-safe schema.
Storybook main.js Generator
Generate the .storybook/main.js for Storybook 7+ with React and Vite, ready to use. Copy the config and start documenting your components in minutes.