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.4 KiB

4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
  1. const mix = require('laravel-mix');
  2. // plugins
  3. const SvgSpritemapPlugin = require('svg-spritemap-webpack-plugin')
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Mix Asset Management
  7. |--------------------------------------------------------------------------
  8. |
  9. | Mix provides a clean, fluent API for defining some Webpack build steps
  10. | for your Laravel applications. By default, we are compiling the CSS
  11. | file for the application as well as bundling up all the JS files.
  12. |
  13. */
  14. mix.webpackConfig({
  15. module: {
  16. rules: [{
  17. test: /\.riot$/,
  18. use: [{
  19. loader: '@riotjs/webpack-loader',
  20. query: {
  21. hot: false
  22. }
  23. }]
  24. }
  25. ]},
  26. plugins: [
  27. new SvgSpritemapPlugin('resources/icons/*.svg', {
  28. output: {
  29. filename: 'symbol-defs.svg',
  30. chunk: {
  31. keep: true
  32. }
  33. },
  34. sprite: {
  35. prefix: 'icon-'
  36. }
  37. })
  38. ]
  39. })
  40. mix
  41. .js('resources/js/bootstrap.js', 'public/js')
  42. .js('resources/js/views/home.js', 'public/js')
  43. .js('resources/js/views/bucket.js', 'public/js')
  44. .js('resources/js/views/bucket-single.js', 'public/js')
  45. .sass('resources/scss/bootstrap.scss', 'public/css')
  46. .options({
  47. terser: {
  48. extractComments: false,
  49. }
  50. })