const path = require('path'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const CopyPlugin = require('copy-webpack-plugin'); module.exports = { context: path.resolve(__dirname, 'src'), target: 'web', resolve: { modules: [ path.resolve(__dirname, 'node_modules') ] }, plugins: [ new CleanWebpackPlugin(), new CopyPlugin({ patterns: [ { from: 'config*.json', to: '/' }, { from: 'themes/', to: 'themes/' } ] }) ], output: { filename: '[name].bundle.js', path: path.resolve(__dirname, 'dist') } };