We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9504da6 commit 947b4c0Copy full SHA for 947b4c0
src/index.js
@@ -1,3 +1,5 @@
1
+(function () {
2
+
3
/**
4
* Copied from vue-resource
5
*/
@@ -85,8 +87,12 @@ function plugin(Vue, axios) {
85
87
});
86
88
}
89
-if (typeof window !== 'undefined' && window.Vue && window.axios) {
- window.Vue.use(plugin, window.axios);
90
+if (typeof exports == "object") {
91
+ module.exports = plugin;
92
+} else if (typeof define == "function" && define.amd) {
93
+ define([], function(){ return plugin });
94
+} else if (window.Vue && window.axios) {
95
+ Vue.use(plugin, window.axios);
96
97
-export default plugin;
98
+})();
0 commit comments