diff --git a/src/app/app.ts b/src/app/app.ts index cd2fabf7..119a007a 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -337,8 +337,14 @@ Promise.all([ if (!target.endsWith('/')) { target = `${target}/` } + + if (target.startsWith('/dev/')) { + reload(target.slice(4)) + return + } + if (track) { - ga('set', 'page', target.replace(/^\/dev/, '')) + ga('set', 'page', target) ga('send', 'pageview'); history.pushState(target, 'Change Page', target) } diff --git a/webpack.config.js b/webpack.config.js index e4281be3..4ef59bc8 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -40,6 +40,11 @@ module.exports = (env, argv) => ({ filename: 'index.html', template: 'src/index.html' }), + new HtmlWebpackPlugin({ + title: 'Data Pack Generators Minecraft', + filename: '404.html', + template: 'src/index.html' + }), ...config.models.flatMap(buildModel) ] })