Skip to content

Commit

Permalink
chore: upgrade all dependencies (#738)
Browse files Browse the repository at this point in the history
* chore: update dev dependencies

* chore: update non rollup deps

* upgrade rollup

* update rollup-plugin dependencies

* add changeset
  • Loading branch information
wardpeet committed Dec 18, 2020
1 parent e2eabae commit bd5d15e
Show file tree
Hide file tree
Showing 8 changed files with 7,657 additions and 9,195 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-pens-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'microbundle': minor
---

Upgrade rollup to version latest and upgrade all its dependencies
63 changes: 31 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ In addition to the above formats, Microbundle also outputs a `modern` bundle spe
```js
// Our source, "src/make-dom.js":
export default async function makeDom(tag, props, children) {
let el = document.createElement(tag);
el.append(...await children);
return Object.assign(el, props);
let el = document.createElement(tag);
el.append(...(await children));
return Object.assign(el, props);
}
```

Expand All @@ -80,26 +80,25 @@ Compiling the above using Microbundle produces the following `modern` and `esm`
<tbody><tr valign="top"><td>

```js
export default async function(e, t, a) {
let n = document.createElement(e);
n.append(...await a);
return Object.assign(n, t);
export default async function (e, t, a) {
let n = document.createElement(e);
n.append(...(await a));
return Object.assign(n, t);
}
```

</td><td>

```js
export default function(e, t, r) {
try {
var n = document.createElement(e);
return Promise.resolve(r).then(function(e) {
return n.append.apply(n, e),
Object.assign(n, t);
});
} catch (e) {
return Promise.reject(e);
}
export default function (e, t, r) {
try {
var n = document.createElement(e);
return Promise.resolve(r).then(function (e) {
return n.append.apply(n, e), Object.assign(n, t);
});
} catch (e) {
return Promise.reject(e);
}
}
```

Expand All @@ -109,28 +108,28 @@ export default function(e, t, r) {

```jsonc
{
"main": "./dist/foo.umd.js", // legacy UMD output (for Node & CDN use)
"module": "./dist/foo.module.js", // legacy ES Modules output (for bundlers)
"exports": "./dist/foo.modern.js", // modern ES2017 output
"scripts": {
"build": "microbundle src/foo.js"
}
"main": "./dist/foo.umd.js", // legacy UMD output (for Node & CDN use)
"module": "./dist/foo.module.js", // legacy ES Modules output (for bundlers)
"exports": "./dist/foo.modern.js", // modern ES2017 output
"scripts": {
"build": "microbundle src/foo.js"
}
}
```

The `"exports"` field can also be an object for packages with multiple entry modules:

```jsonc
{
"name": "foo",
"exports": {
".": "./dist/foo.modern.js", // import "foo" (the default)
"./lite": "./dist/lite.modern.js", // import "foo/lite"
"./full": "./dist/full.modern.js" // import "foo"
},
"scripts": {
"build": "microbundle src/*.js" // build foo.js, lite.js and full.js
}
"name": "foo",
"exports": {
".": "./dist/foo.modern.js", // import "foo" (the default)
"./lite": "./dist/lite.modern.js", // import "foo/lite"
"./full": "./dist/full.modern.js" // import "foo"
},
"scripts": {
"build": "microbundle src/*.js" // build foo.js, lite.js and full.js
}
}
```

Expand Down
Loading

0 comments on commit bd5d15e

Please sign in to comment.