const CopyWebpackPlugin = require('copy-webpack-plugin'); const config = require('./config'); module.exports = { mode: config.debug ? 'development' : 'production', entry: `${__dirname}/front/index.js`, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader', }, ], }, output: { filename: 'index.js', path: `${__dirname}/public`, publicPath: '/', } };