Skip to content

Instantly share code, notes, and snippets.

@evvvritt
Last active March 1, 2017 21:38
Show Gist options
  • Save evvvritt/f8ce4429fd34028f62d617ffcdb15d61 to your computer and use it in GitHub Desktop.
Save evvvritt/f8ce4429fd34028f62d617ffcdb15d61 to your computer and use it in GitHub Desktop.
VueJS Webpack – Generate 200.html file for client-side routing on Surge
// Clone built index.html file as 200.html for client-side routing on Surge hosting
// Place inside webpack() callback in /build/build.js — That's it ;D
shell.cp(config.build.index, config.build.assetsRoot+'/200.html')
// VueJS Webpack Boilerpate – https://github.com/vuejs-templates/webpack
// ShellJS – https://github.com/shelljs/shelljs#cpoptions-source_array-dest
// Surge – https://surge.sh/help/adding-a-200-page-for-client-side-routing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment