const path = require('path'); const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { performance: { hints: false, maxEntrypointSize: 512000, maxAssetSize: 512000 }, devtool: 'cheap-module-source-map', entry: { 'SEQTA': './src/SEQTA.js', 'background': './src/background.js', }, output: { filename: '[name].js', path: path.resolve(__dirname, 'build'), }, module: { rules: [ { test: /\.css$/, use: ['style-loader', 'css-loader'], include: path.resolve(__dirname, 'src'), }, { test: /\.(png|svg|jpg|jpeg|gif)$/i, type: 'asset/resource', generator: { filename: 'src/[path][name][ext]', }, }, ], }, plugins: [ new CopyWebpackPlugin({ patterns: [ { from: 'public', to: '.' }, // Copies everything from the public folder to the root level of build { from: 'src/inject', to: 'inject' }, ], }), ], };