const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
publicPath: './',
},
mode: 'development',
experiments: {
asyncWebAssembly: true,
},
devServer: {
static: {
directory: path.resolve(__dirname, 'dist'),
},
open: true,
port: 8080,
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: path.resolve(__dirname, '../pkg/*.wasm'), to: '[name][ext]' }
]
})
]
};