{"id":19335238,"url":"https://github.com/wp-blocks/vite-block","last_synced_at":"2025-06-10T23:04:33.814Z","repository":{"id":215702571,"uuid":"739540930","full_name":"wp-blocks/vite-block","owner":"wp-blocks","description":"Vite Block is an experimental WordPress block development repository that explores the usage of Vite as a replacement for webpack, leveraging its advantages in ES module (ESM) support, faster build times, and efficient development workflows.","archived":false,"fork":false,"pushed_at":"2024-01-10T22:00:16.000Z","size":117,"stargazers_count":3,"open_issues_count":10,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-10T23:04:21.231Z","etag":null,"topics":["gutenberg","gutenberg-blocks","vitejs","wordpress"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/wp-blocks.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-05T20:21:03.000Z","updated_at":"2024-11-18T02:48:57.000Z","dependencies_parsed_at":"2024-01-10T20:42:18.453Z","dependency_job_id":"e6446977-b58a-4f26-8f83-6d19f2bfe8ba","html_url":"https://github.com/wp-blocks/vite-block","commit_stats":null,"previous_names":["erikyo/vite-block","wp-blocks/vite-block"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-blocks%2Fvite-block","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-blocks%2Fvite-block/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-blocks%2Fvite-block/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-blocks%2Fvite-block/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wp-blocks","download_url":"https://codeload.github.com/wp-blocks/vite-block/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-blocks%2Fvite-block/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259166890,"owners_count":22815585,"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":["gutenberg","gutenberg-blocks","vitejs","wordpress"],"created_at":"2024-11-10T03:06:36.305Z","updated_at":"2025-06-10T23:04:33.784Z","avatar_url":"https://github.com/wp-blocks.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![image](https://github.com/erikyo/vite-block/assets/8550908/162f93ed-0427-4760-84c5-9b0db7836494)\n\n# Vite Block for Wordpress\n\nVite Block is an experimental WordPress block development repository that explores the usage of Vite as a replacement for webpack, leveraging its advantages in ES module (ESM) support, faster build times, and efficient development workflows.\n\n## Installation\n\nTo get started, clone this repository and navigate to the project directory.\n\n```bash\ngit clone https://github.com/your-username/vite-block.git\ncd vite-block\n```\n\nInstall the dependencies using npm:\n\n```bash\nnpm install\n```\n\n## Scripts\n\n- `npm run packages-update`: Update WordPress packages using wp-scripts.\n- `npm start`: Build the project with TypeScript and Vite, watching for changes.\n- `npm run build`: Build the project with TypeScript and Vite.\n- `npm run dev`: Run the development server with Vite.\n- `npm run lint`: Lint the project using ESLint.\n- `npm run wp-env:start`: Start the WordPress development environment.\n- `npm run wp-env:stop`: Stop the WordPress development environment.\n- `npm run wp-env:destroy`: Destroy the WordPress development environment.\n- `npm run plugin-zip`: Package the plugin for distribution.\n\n## DevDependencies\n\n- `@types/node`: TypeScript definitions for Node.js.\n- `@types/react` and `@types/react-dom`: TypeScript definitions for React.\n- `@types/wordpress__block-editor` and `@types/wordpress__blocks`: TypeScript definitions for WordPress block editor and blocks.\n- `@typescript-eslint/eslint-plugin` and `@typescript-eslint/parser`: ESLint plugin and parser for TypeScript.\n- `@vitejs/plugin-react`: Vite plugin for React.\n- `@wordpress/block-editor` and `@wordpress/blocks`: WordPress block editor and blocks packages.\n- `eslint`, `eslint-plugin-react-hooks`, `eslint-plugin-react-refresh`: ESLint and plugins for React linting.\n- `sass`: Sass compiler.\n- `terser`: JavaScript minifier.\n- `typescript`: TypeScript compiler.\n- `vite`: Vite bundler for faster development.\n- `vitest`: Test runner for Vite.\n\n## Development Workflow\n\n1. Run `npm start` to start the development server.\n2. Develop your WordPress blocks using Vite's fast development environment.\n3. Test and lint your code using `npm run dev` and `npm run lint`.\n4. Package your plugin for distribution using `npm run plugin-zip`.\n\n## Contributing\n\nFeel free to contribute to this experimental project by opening issues, suggesting enhancements, or submitting pull requests. Your feedback and contributions are highly appreciated.\n\n## License\n\nThis project is licensed under the GPL-2.0-or-later license. See the [LICENSE.md](LICENSE.md) file for details.\n\nThank you for checking out Vite Block! Happy coding!\n\n\n\u003c!-- Notes for me\nTo enable the HMR those files are needed \n`\u003c!-- if development --\u003e\n\u003cscript type=\"module\" src=\"http://localhost:5173/@vite/client\"\u003e\u003c/script\u003e\n\u003cscript type=\"module\" src=\"http://localhost:5173/main.js\"\u003e\u003c/script\u003e`\n\nand this has to be appended before the above scripts\n`\u003cscript type=\"module\"\u003e\nimport RefreshRuntime from 'http://localhost:5173/@react-refresh'\nRefreshRuntime.injectIntoGlobalHook(window)\nwindow.$RefreshReg$ = () =\u003e {}\nwindow.$RefreshSig$ = () =\u003e (type) =\u003e type\nwindow.__vite_plugin_react_preamble_installed__ = true\n\u003c/script\u003e`\n--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-blocks%2Fvite-block","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwp-blocks%2Fvite-block","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-blocks%2Fvite-block/lists"}