Use Laravel Mix with Statamic in Blade templates like you already do with Laravel. It uses the Mix class from Laravel as a singleton with some Statamic adaptations for finding theme files. This Addon works with Blade templates only. If you're using Antlers, check out Statamic Mix.
Simply copy the Blend
folder into site/addons/
. That's it!
Just use it like you would normally use Mix with Laravel Blade templates:
<!DOCTYPE html>
<html>
<head>
<title>Statamic</title>
<link rel="stylesheet" href="{{ mix('css/app.css') }}">
</head>
<body>
<script src="{{ mix('js/app.js') }}"></script>
</body>
</html>
You can also change your manifest directory just like you can with Laravel:
<link rel="stylesheet" href="{{ mix('css/app.css', 'public/build') }}">
- Thanks to Ben Furfie for some code in Statamic Mix