{"id":22114,"library":"rollup-plugin-live-server","title":"rollup-plugin-live-server","description":"A Rollup plugin that wraps live-server to provide a webpack-dev-server-like experience with live reload. Current stable version is 2.0.0. Release cadence is low (last release 2019). Key differentiator: leverages live-server's mature feature set (HTTPS, mounting, open browser, etc.) without reinventing the wheel. Unlike rollup-plugin-serve, it provides live reload via WebSocket injection into HTML files. Suitable for development builds but not actively maintained.","status":"maintenance","version":"2.0.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","rollup","plugin","live-server","webpack-dev-server"],"install":[{"cmd":"npm install rollup-plugin-live-server","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-live-server","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-live-server","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core dependency that provides the HTTP server and live reload; this plugin is a thin wrapper around it","package":"live-server","optional":false}],"imports":[{"note":"Exported as a named export, not default","wrong":"import liveServer from 'rollup-plugin-live-server'","symbol":"liveServer","correct":"import { liveServer } from 'rollup-plugin-live-server'"},{"note":"CommonJS require must destructure the named export","wrong":"const liveServer = require('rollup-plugin-live-server')","symbol":"liveServer (CommonJS)","correct":"const { liveServer } = require('rollup-plugin-live-server')"},{"note":"TypeScript users can import the Options type for type safety; not included in original package but may be available in types","wrong":null,"symbol":"Options type","correct":"import type { Options } from 'rollup-plugin-live-server'"}],"quickstart":{"code":"// rollup.config.js\nimport { liveServer } from 'rollup-plugin-live-server';\n\nexport default {\n  input: 'src/index.js',\n  plugins: [\n    liveServer({\n      port: 8001,\n      host: '0.0.0.0',\n      root: 'public',\n      file: 'index.html',\n      open: false,\n      wait: 500,\n    }),\n  ],\n  output: {\n    dir: 'dist',\n    format: 'es',\n  },\n};","lang":"javascript","description":"Shows how to configure and use the plugin in a Rollup config, including common options like port, root, and file."},"warnings":[{"fix":"Refer to https://www.npmjs.com/package/live-server for full option list.","message":"Plugin options are passed directly to live-server; consult live-server docs for all options.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider alternatives like rollup-plugin-serve or @web/dev-server.","message":"Package last updated in 2019 with no recent maintenance; may not work with Rollup v3+.","severity":"deprecated","affected_versions":"2.0.0"},{"fix":"Run npm install --save-dev live-server.","message":"The plugin requires live-server to be installed as a peer dependency. Ensure it's in your package.json.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use mount: [['/from', '/to']] format.","message":"The 'mount' option expects an array of arrays, not an object. Incorrect format will cause errors.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure file is relative, e.g., 'index.html' instead of '/absolute/path/index.html'.","message":"The 'file' option must be a relative path from root, not absolute.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run: npm install --save-dev live-server","cause":"live-server is not installed as a peer dependency.","error":"Error: Cannot find module 'live-server'"},{"fix":"Use: import { liveServer } from 'rollup-plugin-live-server';","cause":"Using default import instead of named import.","error":"TypeError: plugins[i].name is not a function"},{"fix":"Change mount to an array of tuples: mount: [['/from', '/to']]","cause":"The mount option is provided as an object instead of an array of arrays.","error":"Error: [object Object] is not a valid option for mount"},{"fix":"Change the port option or kill the other process.","cause":"Another process is using the specified port.","error":"Error: Port 8001 is already in use"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}