Skip to content

Instantly share code, notes, and snippets.

@binaryweavers
binaryweavers / webpack.mix.js
Created April 20, 2020 12:22 — forked from julienbourdeau/webpack.mix.js
Laravel Mix with multiple Tailwind config and PurgeCSS (separate Admin dashboard and Front app)
const mix = require('laravel-mix');
const tailwindcss = require('tailwindcss');
const rootPath = Mix.paths.root.bind(Mix.paths);
const tailwindPlugins = function(configFile, paths) {
const pluginList = [tailwindcss(configFile)];
if (mix.inProduction()) {
pluginList.push(require('@fullhuman/postcss-purgecss')({