A simple Laravel Mix wrapper for PurgeSVG.
Also available as a webpack plugin here.
npm install --save-dev laravel-mix-purge-svg
yarn add --dev laravel-mix-purge-svg
By default the plugin assumes you have the configuration file purgesvg.js
inside your root directory. You can copy the default empty config file from the plugin.
From inside your root application directory run:
cp ./node_modules/laravel-mix-purge-svg/purgesvg.js .
All configuration options can be found here.
let mix = require('laravel-mix');
require('laravel-mix-purge-svg');
mix
.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.purgeSvg()