Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. const path = require('path')
  2. const ExtractTextPlugin = require('extract-text-webpack-plugin')
  3.  
  4. const webpackConfig = {
  5. devtool: 'source-map',
  6. entry: './src/index.js',
  7.  
  8. output: {
  9. path: path.resolve(__dirname, './build'),
  10. filename: 'index.bundle.js'
  11. },
  12.  
  13. module: {
  14. rules: [
  15. {
  16. test: /\.css/,
  17. use: ExtractTextPlugin.extract({
  18. fallback: 'style-loader',
  19. use: [
  20. 'css-loader?sourceMap',
  21. 'postcss-loader'
  22. ]
  23. })
  24.  
  25. }
  26. ]
  27. },
  28. plugins: [
  29. new ExtractTextPlugin('styles.css')
  30. ]
  31.  
  32. }
  33.  
  34. module.exports = webpackConfig
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement