Boilerplate to use a Directus Instance to Build a Custom Website, Content will be Manage by Directus
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.3 KiB

3 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 the application as well as bundling up all the JS files.
  13. |
  14. */
  15. mix.webpackConfig({
  16. plugins: [
  17. new SvgSpritemapPlugin([
  18. 'resources/icons/*.svg',
  19. ], {
  20. output: {
  21. filename: 'public/symbol-defs.svg',
  22. chunk: {
  23. keep: true
  24. }
  25. },
  26. sprite: {
  27. prefix: 'icon-'
  28. }
  29. })
  30. ]
  31. })
  32. mix.options({
  33. terser: {
  34. extractComments: false
  35. },
  36. processCssUrls: false
  37. })
  38. mix
  39. .setPublicPath('./')
  40. .js('resources/js/main.js', 'public/js')
  41. .sass('resources/scss/styles.scss', 'public/css')
  42. .purgeCss({
  43. extend: {
  44. content: [
  45. path.join(__dirname, 'resources/views/**/*.php')
  46. ]
  47. }
  48. })
  49. .version()