{"id":22217725,"url":"https://github.com/pixelcollective/laravel-mix-wp-blocks","last_synced_at":"2025-07-27T14:32:17.774Z","repository":{"id":57166689,"uuid":"184627122","full_name":"pixelcollective/laravel-mix-wp-blocks","owner":"pixelcollective","description":"adds mix.block() to Laravel Mix","archived":false,"fork":false,"pushed_at":"2023-10-24T23:41:40.000Z","size":30,"stargazers_count":33,"open_issues_count":5,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-29T08:44:01.282Z","etag":null,"topics":["laravel-mix","webpack","wordpress"],"latest_commit_sha":null,"homepage":"","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/pixelcollective.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"publiccode":null,"codemeta":null},"funding":{"patreon":"user?u=27947550"}},"created_at":"2019-05-02T17:58:51.000Z","updated_at":"2024-03-20T12:42:21.000Z","dependencies_parsed_at":"2024-06-18T19:51:49.085Z","dependency_job_id":"509c2e36-deae-4c32-8ffb-d4b7db804a69","html_url":"https://github.com/pixelcollective/laravel-mix-wp-blocks","commit_stats":null,"previous_names":["kellymears/laravel-mix-wp-blocks"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelcollective%2Flaravel-mix-wp-blocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelcollective%2Flaravel-mix-wp-blocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelcollective%2Flaravel-mix-wp-blocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelcollective%2Flaravel-mix-wp-blocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixelcollective","download_url":"https://codeload.github.com/pixelcollective/laravel-mix-wp-blocks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227810235,"owners_count":17823177,"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":["laravel-mix","webpack","wordpress"],"created_at":"2024-12-02T22:17:35.927Z","updated_at":"2024-12-02T22:17:36.683Z","avatar_url":"https://github.com/pixelcollective.png","language":"JavaScript","funding_links":["https://patreon.com/user?u=27947550"],"categories":[],"sub_categories":[],"readme":"# Laravel Mix WP Blocks\n\n[![Maintainability](https://api.codeclimate.com/v1/badges/4445cb074eab29b4ba42/maintainability)](https://codeclimate.com/github/pixelcollective/laravel-mix-wp-blocks/maintainability) [![npm version](https://badge.fury.io/js/%40tinypixelco%2Flaravel-mix-wp-blocks.svg)](https://badge.fury.io/js/%40tinypixelco%2Flaravel-mix-wp-blocks)\n\n## About\n\nLaravel mix extension to transpile WordPress block scripts.\n\n## Installation\n\n```sh\nnpm install @tinypixelco/laravel-mix-wp-blocks --save-dev\n```\n\n```sh\nyarn add -D @tinypixelco/laravel-mix-wp-blocks\n```\n\n## Usage\n\nIn webpack.config.js:\n\n```js\nrequire(\"@tinypixelco/laravel-mix-wp-blocks\");\n\nmix.block(\"resources/assets/scripts/blocks.js\", \"scripts\");\n```\n\nBy doing so you'll find that you can now utilize all `@wordpress` scoped dependencies using ECMAScript 6 import syntax. Example:\n\n```js\nimport { RichText } from \"@wordpress/block-editor\";\n```\n\nThese packages are included as [webpack externals](https://webpack.js.org/configuration/externals/), so there is no reason to add them to your package file.\n\nYou will also find a php manifest file accompanying each script in your distribution directory. This file declares an array of dependencies based on what you've used in your scripts. Require it and you're set.\n\nAdditional [Dependency Extraction Webpack Plugin options](https://www.npmjs.com/package/@wordpress/dependency-extraction-webpack-plugin#options) maybe be provided as a third argument to `mix.block()`:\n\n```js\nmix.block(\"resources/assets/scripts/blocks.js\", \"scripts\", {\n  outputFormat: \"json\",\n});\n```\n\nBesides the plugin options there is a special flag for the common use case of turning off `@babel/runtime/regenerator` handling by `wp-polyfill`.\n\n```js\nmix.block(\"resources/assets/scripts/blocks.js\", \"scripts\", {\n  disableRegenerator: true,\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelcollective%2Flaravel-mix-wp-blocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixelcollective%2Flaravel-mix-wp-blocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelcollective%2Flaravel-mix-wp-blocks/lists"}