File size: 587 Bytes
1df763a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const path = require('path');

module.exports = {
  entry: './igvcomponent.js', // Your main JavaScript file
  output: {
    filename: 'main.js', // The output file
    path: path.resolve(__dirname, 'build'), // Directory for the build
  },
  module: {
    rules: [
      {
        test: /\.js$/, // Apply Babel to JavaScript files
        exclude: /node_modules/,
        use: {
          loader: 'babel-loader',
          options: {
            presets: ['@babel/preset-env', '@babel/preset-react'] // Presets for React and modern JavaScript
          }
        }
      }
    ]
  }
};