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.

42 lines
1.1 KiB

4 years ago
  1. const mix = require('laravel-mix');
  2. const HtmlWebpackPlugin = require('html-webpack-plugin');
  3. const fs = require('fs');
  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 application. By default, we are compiling the Sass
  11. | file for the application as well as bundling up all the JS files.
  12. |
  13. */
  14. mix.webpackConfig({
  15. plugins: [
  16. new HtmlWebpackPlugin({
  17. filename: 'dist/index.html',
  18. template: 'src/assets/html/index.html.ejs',
  19. inject: false,
  20. svg: fs.readFileSync(__dirname + '/src/assets/icomoon/symbol-defs.svg')
  21. })
  22. ],
  23. module: {
  24. rules: [{
  25. test: /\.riot$/,
  26. exclude: /node_modules/,
  27. use: [{
  28. loader: '@riotjs/webpack-loader',
  29. query: {
  30. hot: false
  31. }
  32. }]
  33. }
  34. ]}
  35. });
  36. mix.js('demo-386.js', 'dist/js');
  37. mix.sass('demo-386.scss', 'dist/css');
  38. mix.copy('src/assets/fonts', 'dist/fonts');