Created
July 7, 2020 13:30
-
-
Save molayli/a107e735d08bd6a955fa733c104f52c3 to your computer and use it in GitHub Desktop.
autoload vue single file components
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
// source : https://github.com/laravel/laravel/blob/v5.8.3/resources/js/app.js | |
const files = require.context('./', true, /\.vue$/i); | |
files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment