diff --git a/.gitignore b/.gitignore index f138991..2274cf0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ yarn.lock node_modules *.wasm out.js +dist diff --git a/webpack.config.js b/webpack.config.js index ae2584e..fea9615 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,10 +1,11 @@ const path = require('path') +const HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { mode: 'development', entry: './main.js', output: { - path: __dirname, + path: `${__dirname}/dist`, filename: 'out.js' }, experiments: {asyncWebAssembly: true}, @@ -17,5 +18,10 @@ module.exports = { stream: 'readable-stream/readable.js', crypto: false } - } + }, + plugins: [ + new HtmlWebpackPlugin({ + template: 'index.html' + }) + ], }