-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
Description
I found it slightly confusing when starting to use this library because the main app.js would require both Vue (the standard library) and vue (this project which is for requiring vue).
I was wondering if one may customize the name of "vue" to make it more obvious. For example, change:
paths: {
"Vue": "https://cdnjs.cloudflare.com/ajax/libs/vue/2.2.1/vue", //for dev
"vue": "https://rawgit.com/edgardleal/require-vue/master/dist/require-vuejs",
},
into:
paths: {
"Vue": "https://cdnjs.cloudflare.com/ajax/libs/vue/2.2.1/vue", //for dev
"reqV": "https://rawgit.com/edgardleal/require-vue/master/dist/require-vuejs",
},
So instead of using vue!
you could use reqV!
, if you prefer.
I tried this and it breaks require-vuejs. The error I see in my browser console:
require.js:968 Uncaught TypeError: Cannot read property 'normalize' of undefined
at b.<anonymous> (require.js:968)
at require.js:134
at require.js:1189
at each (require.js:59)
at b.emit (require.js:1188)
at b.check (require.js:938)
at b.enable (require.js:1176)
at b.init (require.js:788)
at h (require.js:1203)
at Object.completeLoad (require.js:1611)
Is there a reason why the name "vue!" shouldn't be customizable? Granite, I don't have much experience with require.js, and I don't know the "right" way to do things.