Guest User

Untitled

a guest
May 27th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. const path = require('path');
  2. var BrowserSyncPlugin = require('browser-sync-webpack-plugin');
  3.  
  4. module.exports = {
  5. entry: { main: './src/index.js' },
  6. output: {
  7. path: path.resolve(__dirname, 'dist'),
  8. filename: 'main.js'
  9. },
  10. module: {
  11. rules: [
  12. {
  13. test: /\.js$/,
  14. exclude: /node_modules/,
  15. use: {
  16. loader: "babel-loader"
  17. }
  18. }
  19. ]
  20. },
  21. watch: true,
  22. plugins: [
  23. new BrowserSyncPlugin({
  24. host: process.env.IP || 'localhost',
  25. port: process.env.PORT || 3000,
  26. server: {
  27. baseDir: ['./', './build']
  28. }
  29. })
  30. ]
  31. }
Add Comment
Please, Sign In to add comment