webpack.config.js 746 B

12345678910111213141516171819202122232425262728293031323334
  1. const webpack = require("webpack");
  2. const path = require("path");
  3. let config = {
  4. mode: 'development',
  5. entry: [
  6. "./js/reha.js",
  7. "./scss/reha.scss"
  8. ],
  9. output: {
  10. path: path.resolve(__dirname, "./dist"),
  11. filename: "./bundle.js"
  12. },
  13. module: {
  14. rules: [
  15. {
  16. test: /\.scss$/i,
  17. use: [
  18. {
  19. loader: 'file-loader',
  20. options: {
  21. name: 'css/bundle.css',
  22. }
  23. },
  24. // Compile le Sass en CSS
  25. "sass-loader"
  26. ],
  27. },
  28. ],
  29. }
  30. }
  31. module.exports = config;