webpack.config.js 562 B

123456789101112131415161718192021222324
  1. module.exports = {
  2. entry: './main.js',
  3. output: {
  4. filename: 'bundle.js', // default, skippable
  5. publicPath: 'http://localhost/assets'
  6. },
  7. module: {
  8. loaders: [
  9. {
  10. // Tell webpack to use jsx-loader for all *.js/*.jsx files
  11. test: /\.jsx?$/,
  12. loader: 'jsx-loader?insertPragma=React.DOM&harmony'
  13. }
  14. ]
  15. },
  16. externals: {
  17. // Don't bundle the "react" npm package with our bundle.js,
  18. // but get it from a global React variable.
  19. react: 'React'
  20. },
  21. resolve: {
  22. extensions: ['', '.js', '.jsx']
  23. }
  24. };