{"id":13452013,"url":"https://github.com/phaux/es-serve","last_synced_at":"2025-03-23T19:33:27.973Z","repository":{"id":57226993,"uuid":"144505719","full_name":"phaux/es-serve","owner":"phaux","description":"Server for modern single-page web apps","archived":true,"fork":false,"pushed_at":"2019-03-09T18:11:12.000Z","size":102,"stargazers_count":82,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T16:07:11.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phaux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-12T22:39:27.000Z","updated_at":"2023-09-16T18:09:13.000Z","dependencies_parsed_at":"2022-09-04T15:10:13.509Z","dependency_job_id":null,"html_url":"https://github.com/phaux/es-serve","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaux%2Fes-serve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaux%2Fes-serve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaux%2Fes-serve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaux%2Fes-serve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phaux","download_url":"https://codeload.github.com/phaux/es-serve/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245158900,"owners_count":20570283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T07:01:10.057Z","updated_at":"2025-03-23T19:33:27.665Z","avatar_url":"https://github.com/phaux.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# PWA Serve\n\n[![npm](https://img.shields.io/npm/v/pwa-serve.svg)](https://www.npmjs.com/package/pwa-serve)\n\nSimple web server with babel compilation on the fly. In many cases it can be used as a replacement for webpack-dev-server or similar.\n\n**Example usage**\n\n```sh\npwa-serve --dir-map \"dist=src\" --watch \"src\" --watch \"styles\"\n```\n\n## Features\n\n- History API fallback (serve `index.html` for unknown routes).\n- URL rewriting, useful for mapping your `dist` folder to `src`.\n- Compiling scripts on the fly with babel (with cache). Simply add babel config to your project.\n- Resolving bare imports via `babel-plugin-bare-import-rewrite` by default.\n- Watch mode and auto-refresh (like browser-sync).\n\n## Options\n\n- `--port` **number** -\n  Server port (default: 8000)\n\n- `--extensions` / `-e` **string** ... -\n  Specify additional extensions interpreted as JS (default: js, jsx, mjs, ts, tsx)\n\n- `--dir-map` / `-d` **key=value** ... -\n  Directory rewrite rules (e.g. `dist=src`)\n\n- `--ignore` / `-i` **string** ... -\n  Paths which will be omitted from compiling\n\n- `--verbose` / `-v` -\n  Verbose logging mode\n\n- `--watch` / `-w` **string** ... -\n  Enables watch mode and watches provided paths\n\nOptions can be also provided via `server.config.json` (or `.toml`) file (format `opt_name`) or via environment variables (format `APP_OPT_NAME`)\n\n## Non-goals\n\n### Asset bundling\n\nBrowsers can't `import` styles nor images. If you want component-relative assets use `import.meta.url` and configure your bundler appropriately. If you need scoped CSS, use react's styled components or lit-html `` html`\u003cstyle\u003e\u003c/style\u003e` ``.\n\n### Hot module replacement\n\nToo complicated\n\n## Changelog\n\n### `0.2.0`\n\n- Initial version\n\n### `0.2.1`\n\n- Fix 404 on windows\n- Search babel config relative to provided root path\n- Send status text on error\n- Strip ANSI color codes from errors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphaux%2Fes-serve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphaux%2Fes-serve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphaux%2Fes-serve/lists"}