const path = require('path'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const package = require('./package.json'); module.exports = { entry: './src/index.js', module: { rules: [ { test: /\.jsx?$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: package.babel, }, }, ], }, mode: 'development', devtool: 'eval-source-map', devServer: { contentBase: './dist', }, plugins: [ new webpack.EnvironmentPlugin({ DEBUG: false, PUBLIC_URL: null, API_PREFIX: null, CORS_PREFIX: null, }), new HtmlWebpackPlugin({ title: 'FediDag' }), new CopyWebpackPlugin({ patterns: [ 'lib/*' ] }), ], output: { filename: '[name].bundle.js', path: path.resolve(__dirname, 'dist'), }, }