{"id":25426,"library":"esbuild-plugin-webpack-bridge","title":"esbuild-plugin-webpack-bridge","description":"A plugin that enables using webpack loaders within esbuild builds. Current stable version is 0.4.0. Release cadence is irregular; the project is still under development with API subject to change. Key differentiator: bridges the gap between esbuild's speed and webpack's extensive loader ecosystem, allowing reuse of loaders like babel-loader, sass-loader, and postcss-loader without a full webpack setup. Works with ESM and CommonJS esbuild configurations.","status":"active","version":"0.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/igoradamenko/esbuild-plugin-webpack-bridge","tags":["javascript","esbuild","webpack","loader"],"install":[{"cmd":"npm install esbuild-plugin-webpack-bridge","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-plugin-webpack-bridge","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-plugin-webpack-bridge","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required to use the plugin.","package":"esbuild","optional":false}],"imports":[{"note":"Package does not provide a CommonJS export; use default import.","wrong":"const webpackBridge = require('esbuild-plugin-webpack-bridge')","symbol":"webpackBridge","correct":"import webpackBridge from 'esbuild-plugin-webpack-bridge'"},{"note":"Named import does not exist; use default import.","wrong":"const { webpackBridge } = require('esbuild-plugin-webpack-bridge')","symbol":"webpackBridge","correct":"import webpackBridge from 'esbuild-plugin-webpack-bridge'"},{"note":"esbuild is ESM-only; use dynamic import or import statement.","wrong":"const esbuild = require('esbuild')","symbol":"esbuild","correct":"import * as esbuild from 'esbuild'"}],"quickstart":{"code":"import esbuild from 'esbuild';\nimport webpackBridge from 'esbuild-plugin-webpack-bridge';\n\nawait esbuild.build({\n  entryPoints: ['src/index.jsx'],\n  bundle: true,\n  outfile: 'dist/bundle.js',\n  plugins: [\n    webpackBridge({\n      module: {\n        rules: [\n          {\n            test: /\\.jsx?$/,\n            esbuildLoader: 'js',\n            use: [\n              {\n                loader: 'babel-loader',\n                options: {\n                  presets: [['@babel/preset-env', { targets: { ie: 11 } }]],\n                },\n              },\n            ],\n          },\n        ],\n      },\n    }),\n  ],\n});","lang":"javascript","description":"Shows how to use esbuild-plugin-webpack-bridge with a Babel loader for JSX/JS files."},"warnings":[{"fix":"Pin exact version in package.json and monitor releases for breaking changes.","message":"API changes in minor versions: the plugin is under development and the configuration format may break without major version bump.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Check test/ folder for supported features. Loaders expecting full webpack context may behave unexpectedly.","message":"Only a subset of webpack loader features are supported; for example, pitch loaders and inline matchResource may not work.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Ensure Node version and esbuild peer dependency are satisfied.","message":"Requires Node.js >= 12 and esbuild >= 0.8; cannot be used in browsers.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.4.0':20 'allow':51 'api':32 'babel':57 'babel-load':56 'bridg':5,38 'build':15 'cadenc':22 'chang':35 'commonj':75 'configur':77 'current':16 'develop':30 'differenti':37 'ecosystem':50 'enabl':9 'esbuild':2,14,42,76,79 'esbuild-plugin-webpack-bridg':1 'esm':73 'extens':48 'full':68 'gap':40 'irregular':24 'javascript':78 'key':36 'like':55 'loader':12,49,54,58,61,65,81 'plugin':3,7 'postcss':64 'postcss-load':63 'project':26 'releas':21 'reus':52 'sass':60 'sass-load':59 'setup':70 'speed':44 'stabl':17 'still':28 'subject':33 'use':10 'version':18 'webpack':4,11,46,69,80 'within':13 'without':66 'work':71","created_at":"2026-05-01T13:44:42.295262+00:00","updated_at":"2026-05-01T13:44:42.295262+00:00","problems":[{"fix":"Check if the loader relies on webpack internals; consider using a different loader or a workaround.","cause":"Some webpack loaders expect a full webpack compilation object, which is not provided by this plugin.","error":"TypeError: Cannot read properties of undefined (reading 'compilation')"},{"fix":"Install webpack as a dev dependency: npm install --save-dev webpack","cause":"The plugin depends on webpack internally but it is not installed.","error":"Error: Could not resolve 'webpack'"},{"fix":"Verify that the esbuildLoader property matches the expected content type (e.g., 'js' for JavaScript, 'css' for stylesheets).","cause":"The webpackBridge plugin might not be correctly applied or the rule's test doesn't match the file.","error":"Module parse failed: Unexpected token (1:0) - You may need an appropriate loader to handle this file type."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/igoradamenko/esbuild-plugin-webpack-bridge","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/esbuild-plugin-webpack-bridge","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}