JavaScript for WordPress Forums The WP REST API Setting Up The Project

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #36837
    Juliette Tworsey

    Hi Zac,

    First of all, Happy New Year! I haven’t been here for a few months and I’m trying to get back into the swing of immersing myself in this course.

    In following along with I am unable to get Webpack to build successfully after running npm i –save (Node V7.10.1). Instead, I am getting this error:

    ERROR in ./src/index.js
    Module build failed: ReferenceError: Unknown plugin "transform-runtime" specified

    I haven’t encountered this error before and I was wondering if anyone else has, and if so, is there a solution?

    I did try (after some searching) installing babel-preset-stage-2 to see if that would remedy the issue, but it did not resolve the error.

    Thanks so much!


    Zac Gordon

    Hey Juliette!

    Sounds like you just need to install transform-runtime, which helps with preventing code completion.

    If there is a package.json file then you just need to run npm install to pull down everything you need.

    Hope that helps!!!

    Juliette Tworsey

    Hi Zac!

    That (along with the addition of a .babelrc file) did the trick.

    Thanks so much!

    Zac Gordon

    Oh great!

    Do you think there is something wrong with the code I provided in the examples? Please let me know and I’ll post updates 🙂


    Juliette Tworsey

    Hi Zac,

    I don’t think that there is anything wrong (that I know of) with the code that you have provided in the examples, though I did have to add a .babelrc file (via a recommendation from Babel ).

    This is what I have added to my .babelrc file:

      "plugins": [
        ["transform-runtime", {
          "helpers": false,
          "polyfill": false,
          "regenerator": true,
          "moduleName": "babel-runtime"

    I realize that including es2015 in this file may be redundant(?) due to the fact that es2015 is already listed as a preset in thewebpack-config.js file. I’m relatively new to Webpack so I just put it in there for safe measure. Is this an unneeded action?


Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.