isomorphic-rust/percy/static/app_loader.js

10 lines
362 B
JavaScript
Raw Normal View History

2018-09-08 23:46:40 -04:00
const app = import("./percy")
app.then(module => {
console.log("Finished resolving application bundle")
let rootNode = document.getElementById('root')
rootNode.parentElement.replaceChild(module.main(), rootNode)
rootNode = document.getElementById('root')
}, (e) => {
console.log("Unable to resolve application bundle: ")
console.log(e)
})