You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
538 B

4 years ago
  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: [
  19. new ExtractTextPlugin('file.css'),
  20. new OptimizeCssAssetsPlugin({
  21. assetNameRegExp: /optimize-me\.css/g
  22. })
  23. ],
  24. };