webpack.config.js 936 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. const MiniCssExtractPlugin = require("mini-css-extract-plugin")
  2. const StyleLintPlugin = require('stylelint-webpack-plugin')
  3. const path = require("path")
  4. module.exports = {
  5. cache: false,
  6. entry: "./misago/admin/src/index.js",
  7. output: {
  8. path: path.resolve(__dirname, "misago", "static", "misago", "admin-new"),
  9. filename: "index.js"
  10. },
  11. module: {
  12. rules: [{
  13. test: /\.(sa|sc|c)ss$/,
  14. use: [
  15. MiniCssExtractPlugin.loader,
  16. "css-loader",
  17. {
  18. loader: "postcss-loader",
  19. options: {
  20. plugins: function() {
  21. return [
  22. require("autoprefixer")
  23. ]
  24. }
  25. }
  26. },
  27. "sass-loader"
  28. ]
  29. }]
  30. },
  31. plugins: [
  32. new StyleLintPlugin({
  33. configFile: "./node_modules/stylelint-config-twbs-bootstrap/scss/index.js"
  34. }),
  35. new MiniCssExtractPlugin({
  36. filename: "index.css"
  37. })
  38. ]
  39. }