Issues installing Chrome Extension

Sorry for the generic title, I’m not sure how to better describe the issue in 1 line.

I have a chrome extension that I’ve been developing locally using react-chrome-extension-boilerplate. Everything is working locally when the files are hosted on localhost:3000 using npm run dev. I’m at a point now where I need to build the extension and deploy it.

When running npm run build, it builds the project into the build folder but when trying to run it packed or unpacked I get the error

Hot Module replacement API enabled. You should disable react-transform-hmr in production by usingenvsection in Babel configuration. See the example in README: https://github.com/gaearon/react-transform-hmr

Ok great so it appears this transform thing should only be ran on development when hot reloading is enabled. I go to the linked readme and find the code to disable this transform babel addon in production environment:

// original .babelrc
{
  "presets": ["es2015", "stage-0", "react"],
  "plugins": ["add-module-exports", "transform-decorators-legacy", "transform-runtime"]
}

// updated .babelrc
{
  "presets": ["es2015", "stage-0", "react"],
  "env": {
    "development": {
      "plugins":  ["add-module-exports", "transform-decorators-legacy", "transform-runtime"]
    }
  }
}

I set my NODE_ENV=production and then rebuild my extension. After loading it again unpacked I don’t get any error in the injected portion of the extension, but it does not work. When I open the background, I see the console error Uncaught ReferenceError: regeneratorRuntime is not defined. I try packing the extension and loading it through the crx, but I get the same error.