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

55 lines
1.4 KiB

4 years ago
const mix = require('laravel-mix')
const SvgSpritemapPlugin = require('svg-spritemap-webpack-plugin')
3 years ago
const path = require('path')
require('laravel-mix-purgecss')
4 years ago
/*
|--------------------------------------------------------------------------
| 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.
|
*/
mix.webpackConfig({
plugins: [
3 years ago
new SvgSpritemapPlugin([
'src/icons/mono-icons/svg/*.svg',
'src/icons/brands/*.svg'
], {
4 years ago
output: {
3 years ago
filename: 'symbol-defs.svg',
4 years ago
chunk: {
keep: true
},
svgo: {
plugins: [{
removeAttrs: {
attrs: 'fill'
}
}]
},
svg4everybody: false
},
sprite: {
prefix: 'icon-'
}
})
]
})
mix
3 years ago
.setPublicPath('./public')
.sass('src/scss/plain-ui.scss', 'public/plain-ui.css')
.purgeCss({
extend: {
content: [
path.join(__dirname, 'public/*.html'),
]
}
3 years ago
})