Last active
March 1, 2017 21:38
-
-
Save evvvritt/f8ce4429fd34028f62d617ffcdb15d61 to your computer and use it in GitHub Desktop.
VueJS Webpack – Generate 200.html file for client-side routing on Surge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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