File size: 758 Bytes
1df763a
a5f860b
1df763a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a5f860b
 
 
 
 
 
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
25
26
27
28
29
30
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

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
          }
        }
      }
    ]
  },
  plugins: [
    new HtmlWebpackPlugin({
      title: 'IGV Component', // Title for your HTML file
    }),
  ],
};