{"id":25278,"library":"esbuild-dev-tool","title":"esbuild-dev-server","description":"esbuild-dev-server (v0.1.2) provides a hot-reloading development server powered by esbuild, automatically rebuilding and refreshing the browser on file changes. It is designed for minimal configuration and fast iteration, wrapping esbuild's rebuild API with a simple HTTP server. Currently experimental, it requires esbuild ^0.12.9 as a peer dependency. Key differentiator: lightweight alternative to webpack-dev-server for esbuild users.","status":"active","version":"0.1.2","language":"javascript","source_language":"en","source_url":"https://github.com/fa93hws/esbuild-dev-server","tags":["javascript","esbuild"],"install":[{"cmd":"npm install esbuild-dev-tool","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-dev-tool","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-dev-tool","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"core bundling engine, peer dependency","package":"esbuild","optional":false}],"imports":[{"note":"Package is ESM-only; CommonJS require will fail.","wrong":"const createServer = require('esbuild-dev-server')","symbol":"createServer","correct":"import { createServer } from 'esbuild-dev-server'"},{"note":"Alternative named export for convenience; only available in ESM context.","wrong":"","symbol":"startDevServer","correct":"import { startDevServer } from 'esbuild-dev-server'"},{"note":"Default export is an object containing both createServer and startDevServer.","wrong":"const esbuildDevServer = require('esbuild-dev-server')","symbol":"default","correct":"import esbuildDevServer from 'esbuild-dev-server'"}],"quickstart":{"code":"import { createServer } from 'esbuild-dev-server';\nimport esbuild from 'esbuild';\n\nconst server = createServer({\n  build: {\n    entryPoints: ['src/index.js'],\n    bundle: true,\n    outfile: 'dist/bundle.js',\n  },\n  server: {\n    port: 3000,\n    static: 'public',\n  },\n});\n\nserver.start().then(() => {\n  console.log('Dev server running on http://localhost:3000');\n});","lang":"typescript","description":"Initializes a development server with esbuild configuration and a static file directory."},"warnings":[{"fix":"Update esbuild to ^0.12.9.","message":"The package requires esbuild ^0.12.9. Older versions of esbuild are incompatible.","severity":"breaking","affected_versions":"<0.1.0"},{"fix":"Migrate to esbuild-dev-server and update imports.","message":"The legacy 'esbuild-dev' npm package is deprecated; use 'esbuild-dev-server'.","severity":"deprecated","affected_versions":"<0.1.0"},{"fix":"Use only in Node.js environment.","message":"The package does not work in browsers; it is a Node.js only server tool.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use import syntax or switch to dynamic import.","message":"The package is ESM-only. Using CommonJS require() will throw an error.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Change require() to import or use dynamic import().","cause":"Using CommonJS require() to import an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module"},{"fix":"Install esbuild: npm install esbuild","cause":"Missing peer dependency esbuild.","error":"Error: Cannot find module 'esbuild'"},{"fix":"Use named import: import { createServer } from 'esbuild-dev-server'","cause":"Incorrect import of the default export as a function.","error":"TypeError: createServer is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}