Any clue on how to extend Mix like it's possible with elixir?
const elixir = require('laravel-elixir');
const gulp = require('gulp');
const svgmin = require('gulp-svgmin');
elixir.extend('svgmin', (filename, options) => {
new elixir.Task('svgmin', () => {
gulp.src('resources/assets/svg/' + filename)
.pipe(svgmin(options))
.pipe(gulp.dest('public/svg/'))
})
})
Mix doesn't have any plugin ecosystem. If you need to extend it, copy Mix's webpack.config.js file to your project root, and then modify it directly like any other project that uses Webpack.
I found it relatively easy to extend over the CustomTasksPlugin.
Checkout laravel-mix-pug to get the idea on how to do it.
Great work @JeffreyWay !
Most helpful comment
I found it relatively easy to extend over the CustomTasksPlugin.
Checkout laravel-mix-pug to get the idea on how to do it.
Great work @JeffreyWay !