webpack.config.js 980 B

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