Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Mix + custom API for separate builds
const mix = require("laravel-mix") = (id, callback) => {
if (!process.env.SITE || process.env.SITE === id) {
return callback()
};'admin', () => {
mix.js("resources/js/admin/app.js", "public/js/admin.js")
mix.sass("resources/sass/admin/app.scss", "public/css/admin.css")
})'app', () => {
mix.js("resources/js/app.js", "public/js")
mix.sass("resources/sass/app.scss", "public/css/app.css")
// run using:
// SITE=admin yarn run dev
// SITE=app yarn run dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.