webpack.config.js 348 B

1234567891011121314151617181920
  1. module.exports = {
  2. entry: './src/index.js',
  3. output: {
  4. path: __dirname,
  5. filename: './dist/index.js',
  6. libraryTarget: 'commonjs2',
  7. library: 'react-attr'
  8. },
  9. module: {
  10. rules: [
  11. {
  12. test: /\.(js|jsx)$/,
  13. exclude: /node_modules/,
  14. use: {
  15. loader: 'babel-loader'
  16. }
  17. }
  18. ]
  19. }
  20. }