webpack.config.js 805 B

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