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.

55 lines
1.5 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
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([
  16. 'node_modules/@tentakelfabrik/plain-ui/src/icons/mono-icons/svg/*.svg',
  17. 'resources/icons/*.svg'
  18. ], {
  19. output: {
  20. filename: 'public/symbol-defs.svg',
  21. chunk: {
  22. keep: true
  23. },
  24. svgo: {
  25. plugins: [{
  26. removeAttrs: {
  27. attrs: 'fill'
  28. }
  29. }]
  30. },
  31. svg4everybody: false
  32. },
  33. sprite: {
  34. prefix: 'icon-'
  35. }
  36. })
  37. ]
  38. })
  39. mix.options({
  40. terser: {
  41. extractComments: false
  42. },
  43. processCssUrls: false
  44. })
  45. mix
  46. .js('resources/js/index.js', 'public/js')
  47. .js('resources/js/critical.js', 'public/js')
  48. .sass('resources/scss/index.scss', 'public/css')
  49. .copy(
  50. 'node_modules/@tentakelfabrik/plain-ui/src/fonts/*',
  51. 'public/css'
  52. )