-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
30 lines (26 loc) · 985 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var Main = require('./output/Main');
function main() {
/**
* Here we could add variables such as `var baseUrl = process.env.BASE_URL;`
* Parcel will replace `process.env.BASE_URL` with the string contents of
* the BASE_URL environment variable at bundle/build time.
*
* A .env file can also be used to override shell variables.
* For more information, see https://en.parceljs.org/env.html. These variables
* can be supplied to the Main.main function. However, you will need to change
* the type to accept variables, by default it is an Effect. You will probably
* want to make it a function from String -> Effect ()
*/
Main.main();
}
// HMR setup. For more info see: https://parceljs.org/hmr.html
if (module.hot) {
module.hot.dispose(function () {
document.querySelector('#app').innerHTML = '';
});
module.hot.accept(function () {
console.log('Reloaded, running main again');
});
}
console.log('Starting app...');
main();