Add an async function in app-main.js

Hi all:
When I add a method in app-main.js like this:
export async function test () {

init(reducers, getRoutes, store => {
// received a 401 response
api.on("401", url => {
if (url.indexOf("/api/user/current") >= 0) {

// received a 403 response
api.on("403", url => {
if (NOT_AUTHORIZED_TRIGGERS.some(regex => regex.test(url))) {
return store.dispatch(setErrorPage({ status: 403 }));

And when I run yarn build-hot, and access localhost:3000, I got an error in my chome console:
Uncaught ReferenceError: regeneratorRuntime is not defined

And I have tried other babel configuration, but that did not work. So any one can help?


A post was merged into an existing topic: Can not add a function in app-main.js