webpack.config.js 408 B

123456789101112131415161718192021
  1. var webpack = require('webpack')
  2. var path = require('path')
  3. module.exports = {
  4. entry: path.resolve(__dirname, 'app'),
  5. output: {
  6. path: __dirname + '/dist',
  7. publicPath: '/',
  8. filename: 'bundle.js'
  9. },
  10. module: {
  11. rules: [{
  12. test: /\.(js|jsx)$/,
  13. exclude: /node_modules/,
  14. loader: 'babel-loader'}]
  15. },
  16. devServer: {
  17. contentBase: path.resolve(__dirname, 'public')
  18. }
  19. }