Skip to content

Commit 9ea7087

Browse files
Properly export global name when directly included in a script tag
1 parent 310a6e2 commit 9ea7087

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Diff for: .babelrc

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"es2015"
44
],
55
"plugins": [
6-
"add-module-exports"
6+
"add-module-exports",
7+
"transform-es2015-modules-umd",
8+
["rename-umd-globals", {
9+
"index": "AsyncComputed"
10+
}]
711
]
812
}

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Alternately, you can link it directly from a CDN:
102102
That will always point to the latest version of vue-async-computed.
103103
You probably want to instead pin it to a specific version:
104104
-->
105-
<script src="https://unpkg.com/vue-async-computed@2.1.1"></script>
105+
<script src="https://unpkg.com/vue-async-computed@2.2.1"></script>
106106
````
107107
108108
When used with a module system such as `webpack` or `browserify`, you need to explicitly install `vue-async-computed` via `Vue.use()`:

Diff for: package.json

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
"babel-core": "^6.7.7",
5252
"babel-eslint": "^7.0.0",
5353
"babel-plugin-add-module-exports": "^0.2.1",
54+
"babel-plugin-rename-umd-globals": "^1.0.0",
55+
"babel-plugin-transform-es2015-modules-umd": "^6.18.0",
5456
"babel-preset-es2015": "^6.6.0",
5557
"coveralls": "^2.11.9",
5658
"dependency-check": "^2.5.1",

0 commit comments

Comments
 (0)