webpack.config.js 473 B

1234567891011121314151617181920
  1. import ExtractTextPlugin from "extract-text-webpack-plugin";
  2. import OptimizeCssAssetsPlugin from "../../../src/";
  3. module.exports = {
  4. entry: "./index",
  5. module: {
  6. rules: [
  7. {
  8. test: /\.css$/,
  9. use: ExtractTextPlugin.extract({
  10. fallback: { loader: "style-loader" },
  11. use: {
  12. loader: "css-loader"
  13. }
  14. })
  15. }
  16. ]
  17. },
  18. plugins: [new ExtractTextPlugin("file.css"), new OptimizeCssAssetsPlugin()]
  19. };