Skip to content

Commit 7eeb9bb

Browse files
committed
hoist
1 parent c54ea96 commit 7eeb9bb

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77
"backend": "dist/dataparty.js",
88
"embedded": "dist/dataparty-embedded.js",
99
"alias": {
10-
"events": "eventemitter3"
10+
"events": "eventemitter3",
11+
"process": "process/browser.js",
12+
"assert": "assert",
13+
"crypto": "crypto-browserify"
1114
},
1215
"targets": {
1316
"frontend": {
1417
"context": "browser",
1518
"source": "src/index-browser.js",
1619
"optimize": false,
1720
"includeNodeModules": true,
18-
"scopeHoist": true,
21+
"scopeHoist": false,
1922
"engines": {
2023
"browsers": "Chrome 80"
2124
}

public/example.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<html>
22
<head>
3-
<script type="module" src="dist/dataparty-browser.js">
4-
console.log(Dataparty)
3+
<script src="dist/dataparty-browser.js">
4+
55
</script>
66
</head>
77

src/index-browser.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@ const Config = {
1010
}
1111

1212

13-
let lib = {
13+
export default {
1414
Comms,
1515
Config,
1616
...Party
1717
}
18-
19-
20-
module.exports = lib

src/index-embedded.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const Config = require('./config')
33
const Party = require('./party/index-embedded')
44
const Bouncer = require('./bouncer')
55

6-
module.exports = {
6+
export default {
77
Comms,
88
Config,
99
Bouncer,

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const Bouncer = require('./bouncer')
55
const Service = require('./service')
66
const Sandbox = require('./sandbox')
77

8-
module.exports = {
8+
export default {
99
Comms,
1010
Config,
1111
Bouncer,

0 commit comments

Comments
 (0)