Advertisement
Guest User

Untitled

a guest
Mar 20th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. const path = require('path');
  2. const HtmlWebpackPlugin = require('html-webpack-plugin');
  3. const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
  4. template: './src/index.html',
  5. filename: 'index.html',
  6. inject: 'body'
  7. })
  8.  
  9. module.exports = {
  10. entry: './src/index.js',
  11. output: {
  12. path: path.resolve(__dirname,'./dist'),
  13. filename: 'bundle.js'
  14. },
  15. module: {
  16. rules: [
  17. { test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/ },
  18. {
  19. test: /\.css$/,
  20. use: ['style-loader','css-loader']
  21. },
  22. {
  23. test: /\.js$/,
  24. exclude: /node_modules/,
  25. loader: "babel-loader"
  26. }
  27. ]
  28. },
  29. plugins: [HtmlWebpackPluginConfig]
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement