SVGs
Sprites
This should be done by default in
v0.2.18. Otherwise follow the instructions below.
SVG sprites need a few things to be working.
- You will need the
webpack-svgstore-pluginnpm package if it's not already installed. - You will need
resources/assets/js/svg.jsif you don't already have it.php artisan vendor:publishshould give it to you if you don't. You will need the following in your
webpack.mix.js:plugins: [ new webpack.NormalModuleReplacementPlugin(/^\.\/package$/, function (result) { if (/cheerio/.test(result.context)) { result.request = "./package.json" } }), ] // ... .js('resources/assets/js/svg.js', 'public/js/svg.js') .version([ 'public/svg/sprite.svg' ])