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

51 lines
1.3 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: [
new SvgSpritemapPlugin('src/icons/*.svg', {
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
})