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.

40 lines
988 B

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. })
  21. ],
  22. module: {
  23. rules: [{
  24. test: /\.riot$/,
  25. exclude: /node_modules/,
  26. use: [{
  27. loader: '@riotjs/webpack-loader',
  28. query: {
  29. hot: false
  30. }
  31. }]
  32. }
  33. ]}
  34. });
  35. mix.js('demo-386.js', 'dist/js')
  36. .copy('src/assets/img/*', 'dist');