Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 996 Bytes

README.md

File metadata and controls

35 lines (25 loc) · 996 Bytes

Purgesvg wrapper for Laravel Mix

A simple Laravel Mix wrapper for PurgeSVG.

Also available as a webpack plugin here.

Installation

npm install --save-dev laravel-mix-purge-svg
yarn add --dev laravel-mix-purge-svg

Config

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.

Usage

Example webpack.mix.js

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()