You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
plain-ui/webpack.mix.js

67 lines
1.6 KiB

const mix = require('laravel-mix')
const SvgSpritemapPlugin = require('svg-spritemap-webpack-plugin')
const path = require('path')
require('laravel-mix-purgecss')
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for your application, as well as bundling up your JS files.
|
*/
/**
* svgo: {
* plugins: [{
* removeAttrs: {
* attrs: 'fill'
* }
* }]
*},*
* @type {Array}
*/
mix.webpackConfig({
plugins: [
new SvgSpritemapPlugin([
'src/icons/mono-icons/svg/*.svg',
'src/icons/brands/*.svg'
], {
output: {
filename: 'symbol-defs.svg',
chunk: {
keep: true
},
svg4everybody: false,
svgo: {
plugins: [{
name: 'removeAttrs',
params: {
attrs: 'fill'
}
}]
}
},
sprite: {
prefix: 'icon-'
}
})
]
})
mix
.setPublicPath('./examples')
.sass('src/scss/plain-ui.scss', 'examples/plain-ui.css')
.purgeCss({
extend: {
content: [
path.join(__dirname, 'examples/*.html'),
]
}
})