const HtmlWebPackPlugin = require('html-webpack-plugin'); const path = require('path'); module.exports = { entry: { main: './index.jsx', }, output: { globalObject: 'this', filename: '[name].bundle.js', path: path.resolve(__dirname, 'dist'), }, module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader', }, }, { test: /\.css$/, use: ['style-loader', 'css-loader'], }, { test: /\.ttf$/, loader: 'file-loader', }, ], }, plugins: [ new HtmlWebPackPlugin({ template: './index.html', }), ], };