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.

67 lines
1.8 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
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. module: {
  15. rules: [{
  16. test: /\.riot$/,
  17. use: [{
  18. loader: '@riotjs/webpack-loader',
  19. options: {
  20. hot: false
  21. }
  22. }]
  23. }
  24. ]},
  25. plugins: [
  26. new SvgSpritemapPlugin([
  27. 'node_modules/@tentakelfabrik/plain-ui/src/icons/mono-icons/svg/*.svg',
  28. 'resources/icons/*.svg'
  29. ], {
  30. output: {
  31. filename: 'public/symbol-defs.svg',
  32. chunk: {
  33. keep: true
  34. },
  35. svgo: {
  36. plugins: [{
  37. removeAttrs: {
  38. attrs: 'fill'
  39. }
  40. }]
  41. },
  42. svg4everybody: false
  43. },
  44. sprite: {
  45. prefix: 'icon-'
  46. }
  47. })
  48. ]
  49. })
  50. mix.options({
  51. terser: {
  52. extractComments: false
  53. },
  54. processCssUrls: false
  55. })
  56. mix
  57. .js('resources/js/index.js', 'public/js')
  58. .js('resources/js/critical.js', 'public/js')
  59. .js('resources/js/dashboard.js', 'public/js')
  60. .sass('resources/scss/index.scss', 'public/css')
  61. .copy(
  62. 'node_modules/@tentakelfabrik/plain-ui/src/fonts/*',
  63. 'public/css'
  64. )