UNPKG

vue-autowire

Version:
32 lines (30 loc) 1.12 kB
// Default conventions for autowiring views // NOTES: // - These conventions rely on a webpack alias of "@" set to the project's root folder // It is done by the vue-cli by default, but devs can do so on their own projects // - Values here need to be primitives (not variables) since webpack will parse these when included from the end project // For that reason is also important to separate conventions into separated files so they can be individually imported if needed export default { views: { // Sync views requireContext: require.context( // root folder for components '@/views', // recursive true, // include all .vue files except for the "".async.vue" an the ".local.vue" ones /\/(?:[^.]+|(?!\.local\.vue$)|(?!\.async\.vue$))\.vue$/ ), // Async views requireAsyncContext: require.context( // root folder for components '@/views', // recursive true, // include only .async.vue components /async\.vue$/, // webpack's lazy mode for require.context 'lazy' ) } };