Last active
April 23, 2020 10:09
-
-
Save dlodeprojuicer/7fe327ed93a3e878168fb087e5c6d1db to your computer and use it in GitHub Desktop.
Dynamic route step 2
This file contains hidden or 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
requireModule.keys().map(file => { | |
// filename string example `./Home.vue` | |
const moduleName = file.split("/")[1].split(".vue")[0]; | |
const url = moduleName.replace(/([a-zA-Z])(?=[A-Z])/g, "$1-").toLowerCase(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment