{"id":13448606,"url":"https://github.com/preconstruct/preconstruct","last_synced_at":"2025-05-13T20:19:44.613Z","repository":{"id":33235982,"uuid":"156285001","full_name":"preconstruct/preconstruct","owner":"preconstruct","description":"🎁 Dev and build your code painlessly in monorepos","archived":false,"fork":false,"pushed_at":"2025-03-27T02:19:15.000Z","size":5623,"stargazers_count":1180,"open_issues_count":61,"forks_count":63,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-05T23:38:30.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://preconstruct.tools","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/preconstruct.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-05T21:24:31.000Z","updated_at":"2025-05-03T08:19:22.000Z","dependencies_parsed_at":"2023-02-15T09:46:18.174Z","dependency_job_id":"ee77433b-ced1-43c9-8c64-535f59ea6697","html_url":"https://github.com/preconstruct/preconstruct","commit_stats":{"total_commits":892,"total_committers":40,"mean_commits":22.3,"dds":"0.35089686098654704","last_synced_commit":"b10b747ccded90b428f9c44d808b9dfbf2c4cabd"},"previous_names":[],"tags_count":199,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preconstruct%2Fpreconstruct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preconstruct%2Fpreconstruct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preconstruct%2Fpreconstruct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preconstruct%2Fpreconstruct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preconstruct","download_url":"https://codeload.github.com/preconstruct/preconstruct/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253492649,"owners_count":21916969,"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-31T05:01:50.290Z","updated_at":"2025-05-13T20:19:44.595Z","avatar_url":"https://github.com/preconstruct.png","language":"TypeScript","readme":"# Preconstruct 🎁\n\n\u003e Dev and build your code painlessly in monorepos\n\n\u003cp\u003e\n  \u003ca title=\"View on npm\" href=\"https://www.npmjs.com/package/@preconstruct/cli\"\u003e\n    \u003cimg alt=\"npm version\" src=\"https://img.shields.io/npm/v/@preconstruct/cli.svg?style=for-the-badge\u0026labelColor=0869B8\"\u003e\n  \u003c/a\u003e\n  \u003ca title=\"View the project license\" href=\"LICENSE\"\u003e\n    \u003cimg alt=\"License SDPX identifer\" src=\"https://img.shields.io/npm/l/@preconstruct/cli.svg?style=for-the-badge\u0026labelColor=579805\"\u003e\n  \u003c/a\u003e\n  \u003ca title=\"Visit Thinkmill\" href=\"https://www.thinkmill.com.au/open-source?utm_campaign=github-preconstruct\"\u003e\n    \u003cimg alt=\"Sponsored by Thinkmill\" src=\"https://img.shields.io/badge/Sponsored%20BY%20Thinkmill-ed0000.svg?style=for-the-badge\u0026logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTg2IiBoZWlnaHQ9IjU4NiIgdmlld0JveD0iMCAwIDU4NiA1ODYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL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UxMiAyNzIuODMyIDMzNC41MTIgMjkzLjU2OFYzODRIMzY3LjM0NFYzMDUuMDg4QzM2Ny4zNDQgMjc3LjE1MiAzNzguODY0IDI2MC43MzYgMzk4LjE2IDI2MC43MzZDNDE0LjU3NiAyNjAuNzM2IDQyNC42NTYgMjcxLjEwNCA0MjQuNjU2IDI5Ny4wMjRWMzg0SDQ1Ny40ODhWMjkzLjg1NkM0NTcuNDg4IDI1NC40IDQzOC40OCAyMzQuMjQgNDA3LjM3NiAyMzQuMjRaIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzE5OTZfNDA2Ij4KPHJlY3Qgd2lkdGg9IjU4NiIgaGVpZ2h0PSI1ODYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==\u0026labelColor=C60200\u0026locoColor=white\u0026logoWidth=0\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Key Features\n\n- In dev mode, your code behaves the same as it will in production, including locally linked in monorepos\n- Add multiple entrypoints to your packages for publishing\n- CLI helps walk you through set-up and making changes to your configs\n- Works with different kinds of JS monorepos\n- Also works for single package repos!\n- Builds your code with rollup\n\n## Getting Started\n\nAssuming you already have a source file at src/index.js (or src/index.ts) or you're using Yarn Workspaces and have packages with src/index.js (or src/index.ts), you can setup Preconstruct like this.\n\n```bash\nyarn add --dev @preconstruct/cli\nyarn preconstruct init\n```\n\nIf you're in a monorepo, you should also run `yarn preconstruct dev` and add it to a postinstall script(`\"postinstall\": \"preconstruct dev\"`) that runs preconstruct dev so that you can import your code without having to rebuild your project every time in changes.\n\n## Publishing packages\n\nBefore you publish packages to npm, run `preconstruct build`. Preconstruct will use your Babel config and build flat bundles so make sure to [configure Babel](https://preconstruct.tools/guides/configuring-babel) with the transforms you want.\n\n\u003e We strongly recomment making a single script in your package.json that runs both build and publish, to stop broken publishes, such as `\"release\": \"preconstruct build \u0026\u0026 yarn publish:packages`. If you're in a single-package repo, you could also run `preconstruct build` in a `prepare` or `prepublishOnly` script.\n\n## Further Guides\n\nThere are a number of tasks that become easier with preconstruct that lie slightly outside the main workflow. Check out the following guides for setting these up.\n\n- [A more detailed account of getting set up](https://preconstruct.tools/tutorials)\n- [Setting up a second entrypoint](https://preconstruct.tools/guides/adding-a-second-entrypoint)\n- [CLI command documentation](https://preconstruct.tools/commands)\n- [Other configuration](https://preconstruct.tools/configuration)\n\n# See the docs at [preconstruct.tools](https://preconstruct.tools)\n\n# Thanks/Inspiration\n\n- [microbundle](https://github.com/developit/microbundle) was a huge inspiration for this! ❤️\n- [rollup](https://rollupjs.org) - rollup has done the really hard stuff that makes preconstruct possible!\n- [bolt](https://github.com/boltpkg/bolt) - lots of utils and things in this project were inspired by things in bolt\n- [Kye Hohenberger](https://github.com/tkh44) for thinking of the name preconstruct\n- Too many awesome people to name at [Thinkmill](https://thinkmill.com.au) who have given so much great feedback to make Preconstruct better and Thinkmill for sponsoring the development of Preconstruct 💝\n- all the people who wrote all the dependencies for this project!\n","funding_links":[],"categories":["TypeScript","🤖 AI \u0026 Machine Learning","others","Code bundlers"],"sub_categories":["Server-rendered React"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreconstruct%2Fpreconstruct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreconstruct%2Fpreconstruct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreconstruct%2Fpreconstruct/lists"}