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.

47 lines
1.3 KiB

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