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.

54 lines
1.4 KiB

3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
  1. const mix = require('laravel-mix')
  2. const SvgSpritemapPlugin = require('svg-spritemap-webpack-plugin')
  3. const path = require('path')
  4. require('laravel-mix-purgecss')
  5. /*
  6. |--------------------------------------------------------------------------
  7. | Mix Asset Management
  8. |--------------------------------------------------------------------------
  9. |
  10. | Mix provides a clean, fluent API for defining some Webpack build steps
  11. | for your Laravel application. By default, we are compiling the Sass
  12. | file for your application, as well as bundling up your JS files.
  13. |
  14. */
  15. mix.webpackConfig({
  16. plugins: [
  17. new SvgSpritemapPlugin([
  18. 'src/icons/mono-icons/svg/*.svg',
  19. 'src/icons/brands/*.svg'
  20. ], {
  21. output: {
  22. filename: 'symbol-defs.svg',
  23. chunk: {
  24. keep: true
  25. },
  26. svgo: {
  27. plugins: [{
  28. removeAttrs: {
  29. attrs: 'fill'
  30. }
  31. }]
  32. },
  33. svg4everybody: false
  34. },
  35. sprite: {
  36. prefix: 'icon-'
  37. }
  38. })
  39. ]
  40. })
  41. mix
  42. .setPublicPath('./public')
  43. .sass('src/scss/plain-ui.scss', 'public/plain-ui.css')
  44. .purgeCss({
  45. extend: {
  46. content: [
  47. path.join(__dirname, 'public/*.html'),
  48. ]
  49. }
  50. })