Skip to content

Commit

Permalink
Reverted back to publishing ES5 builds. Fixes #1584
Browse files Browse the repository at this point in the history
  • Loading branch information
mweststrate committed Jun 11, 2018
1 parent e656edf commit dd68d98
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 5.0.1

* Fixed regression bug: `ObservableMap.size` was no longer observable. Fixes [#1583](https://github.com/mobxjs/mobx/issues/1583)
* Downgraded lib export from ES6 to ES5. To many build tools still trip over ES6. Fixes [#1584](https://github.com/mobxjs/mobx/issues/1584). A modern build is available through `import ... from "mobx/lib/mobx.es6"` (or setup an alias in your build system)
* Added support for mobx-react-devtools

# 5.0.0
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "lib/mobx.js",
"umd:main": "lib/mobx.umd.js",
"module": "lib/mobx.module.js",
"unpkg": "lib/mobx.umd.min.js",
"jsnext:main": "lib/mobx.module.js",
"react-native": "lib/mobx.module.js",
"typings": "lib/mobx.d.ts",
Expand Down
14 changes: 10 additions & 4 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,25 @@ function copyFlowDefinitions() {
}

function build() {
runTypeScriptBuild(".build.cjs", ts.ScriptTarget.ES2015, true)
runTypeScriptBuild(".build.es", ts.ScriptTarget.ES2015, false)
runTypeScriptBuild(".build.es5", ts.ScriptTarget.ES5, true)
runTypeScriptBuild(".build.es6", ts.ScriptTarget.ES2015, false)
return Promise.all([
generateBundledModule(
path.resolve(".build.cjs", "mobx.js"),
path.resolve(".build.es5", "mobx.js"),
path.resolve("lib", "mobx.js"),
"cjs"
),

generateBundledModule(
path.resolve(".build.es", "mobx.js"),
path.resolve(".build.es5", "mobx.js"),
path.resolve("lib", "mobx.module.js"),
"es"
),

generateBundledModule(
path.resolve(".build.es6", "mobx.js"),
path.resolve("lib", "mobx.es6.js"),
"es"
)
]).then(() => {
generateUmd()
Expand Down

0 comments on commit dd68d98

Please sign in to comment.