{"id":15551389,"url":"https://github.com/fandogh/laravel-multimix","last_synced_at":"2026-07-20T10:01:39.591Z","repository":{"id":54567269,"uuid":"86222126","full_name":"fandogh/laravel-multimix","owner":"fandogh","description":"Laravel-Mix helper for projects with complex \u0026 multi assets.","archived":false,"fork":false,"pushed_at":"2021-04-26T14:25:42.000Z","size":165,"stargazers_count":26,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-03-25T01:58:52.434Z","etag":null,"topics":["asset","bootstrap-rtl","laravel","mix","modular","multimix","package","rtl","webpack2"],"latest_commit_sha":null,"homepage":"https://fandogh.github.io/laravel-multimix","language":"JavaScript","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/fandogh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-26T09:43:02.000Z","updated_at":"2023-02-14T18:49:54.000Z","dependencies_parsed_at":"2022-08-13T20:00:41.221Z","dependency_job_id":null,"html_url":"https://github.com/fandogh/laravel-multimix","commit_stats":null,"previous_names":["pi0/laravel-multimix"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fandogh/laravel-multimix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandogh%2Flaravel-multimix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandogh%2Flaravel-multimix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandogh%2Flaravel-multimix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandogh%2Flaravel-multimix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fandogh","download_url":"https://codeload.github.com/fandogh/laravel-multimix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandogh%2Flaravel-multimix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35682457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"ssl_error","status_checked_at":"2026-07-20T02:08:09.736Z","response_time":111,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["asset","bootstrap-rtl","laravel","mix","modular","multimix","package","rtl","webpack2"],"created_at":"2024-10-02T14:04:43.527Z","updated_at":"2026-07-20T10:01:39.574Z","avatar_url":"https://github.com/fandogh.png","language":"JavaScript","funding_links":[],"categories":["Resources"],"sub_categories":["Development Tools"],"readme":"\u003cp align=\"center\"\u003e\r\n\u003ca href=\"#\"\u003e\r\n    \u003cimg src=\"https://github.com/pi0/laravel-multimix/raw/master/banner.png\" width=\"300px\" alt=\"Laravel MultiMix\"\u003e\r\n\u003c/a\u003e\r\n\u003cbr\u003e\r\n\u003ca href=\"https://www.npmjs.com/package/laravel-multimix\"\u003e\r\n    \u003cimg alt=\"\" src=\"https://img.shields.io/npm/v/laravel-multimix.svg?style=flat-square\"\u003e\r\n\u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n\u003e [Laravel-Mix](https://github.com/JeffreyWay/laravel-mix) helper for projects with complex \u0026 multi assets.\r\n\r\n## 🔥 Getting started\r\nSince [mix](https://laravel.com/docs/5.4/mix) introduced in laravel 5.4 it is recommended to use this package for laravel \u003e= 5.4 projects only.\r\n\r\nInstall package:\r\n\r\n```bash\r\n# NPM\r\nnpm install --save-dev laravel-multimix\r\n\r\n# YARN\r\nyarn add --dev laravel-multimix\r\n```\r\n\r\nOpen your `package.json` and replace ugly scrips section with this:\r\n\r\n```json\r\n  {\r\n    \"scripts\": {\r\n      \"mix\": \"node node_modules/laravel-multimix/bin/mix\"\r\n    }\r\n  }\r\n```\r\n\r\nThen you can run your tasks with this single command: \r\n\r\n```bash\r\n    # Usage syntax: npm mix [preset=dev] [package=app]\r\n    \r\n    # Example: run preset hot (with package app)\r\n    npm mix hot\r\n    \r\n    # Example: run preset watch on package bootstrap\r\n    npm mix watch bootstrap\r\n```\r\n\r\n### 🎌 Presets\r\npresets are just different sets of flags and envs passed to webpack.\r\nThey are basically same as default laravel package.json commands.\r\n\r\n**Available Presets**\r\n\r\n- dev\r\n- watch\r\n    - args: `--watch`\r\n- poll\r\n    - args: `--watch --watch-poll`\r\n- hot\r\n    - args: `--hot --inline`\r\n    - entry: `webpack-dev-server`\r\n- production\r\n    - env: `production`\r\n    \r\n### 📦 Packages\r\nPackages are optional and available via `MIX_PACKAGE` env. It will do nothing by default. \r\nBut is very useful when using with Utils.\r\nThe philosophy behind packages is to having separate assets with different build workflow.\r\nThis makes builds cleaner, faster and more efficient.\r\n \r\n### 💁 Utils\r\nLaravel MultiMix exposes some utils constant and functions.\r\n\r\n- **MIX_PACKAGE** : is same as package name argument\r\n- **NPM** : is relative path to `node_modules`\r\n- **VENDOR** : is relative path to `resources/assets/vendor`\r\n- **output(package_name)**: generates path to public with this template: `public/assets/{package}/`  \r\n- **OUTPUT**: is output for current MIX_PACKAGE\r\n\r\nSee example below for better understanding.\r\n\r\n### 📚 Example\r\n\r\n```js\r\n// webpack.mix.js\r\n\r\nconst {mix} = require('laravel-mix');\r\nconst {MIX_PACKAGE, NPM, VENDOR, OUTPUT, output} = require('laravel-multimix');\r\n\r\n/*\r\n |--------------------------------------------------------------------------\r\n | Bootstrap\r\n | @package bootstrap\r\n |--------------------------------------------------------------------------\r\n */\r\nif (MIX_PACKAGE === 'bootstrap') {\r\n    // Bootstrap + RTL\r\n    // generates public/assets/bootstrap/bootstrap.css\r\n    mix.sass('resources/assets/sass/bootstrap.scss', OUTPUT).options({postCss: [require('postcss-rtl')()]});\r\n}\r\n\r\n/*\r\n |--------------------------------------------------------------------------\r\n | App\r\n | @package app\r\n |--------------------------------------------------------------------------\r\n */\r\nif (MIX_PACKAGE === 'app') {\r\n       // JS\r\n       // generates public/assets/app/app.js\r\n       mix.js('resources/assets/js/app.js', OUTPUT).extract([\r\n           'jquery',\r\n           'nprogress',\r\n           'swiper',\r\n           \r\n       ]);\r\n   \r\n       // CSS\r\n       // generates public/assets/app/app.css\r\n        mix.styles([\r\n           output('bootstrap') + 'bootstrap.css',\r\n           NPM + 'swiper/dist/css/swiper.min.css',\r\n           \r\n       ], OUTPUT + 'app.css');\r\n}\r\n```\r\n\r\n## ☂️Common Issues\r\n\r\n**Reload watcher when webpack.mix.js file is udpdated**    \r\nSee [#1](https://github.com/fandogh/laravel-multimix/issues/1)\r\n\r\n## 💡 Former \u0026 Related projects\r\n\r\n- [laravel-elixir-packager](https://github.com/pi0/laravel-elixir-packager)\r\n- [laravel-elixir-rtl](https://github.com/pi0/laravel-elixir-rtl)\r\n- [laravel-elixirx (deprecated)](https://github.com/pi0/laravel-elixirx)\r\n\r\n## 🗝 License\r\nThe MIT License (MIT) - Copyright (c) 2017 Fandogh - Pooya Parsa\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffandogh%2Flaravel-multimix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffandogh%2Flaravel-multimix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffandogh%2Flaravel-multimix/lists"}