1. Introduction

Sunday night, preparing another small javascript project and struggling with a few dependencies.

2. The Problem

Copy-pasting configurations some times goes wrong of course, so I ended up like below:

83e632eb7c5cac296071836a3e3688a9

3. The Solution

3.1 react-hot-loader

Navigating to link the error stack returned, I found out I should better give a try to the descendant of react-transform-hmr: react-hot-loader

3.2 Minimal configuration in .babelrc

If you just check the configuration in react-hot-boilerplate, you kinda understand the big of a change that we went through, you only have to define one line in your .babelrc file:

{
  "presets": ["es2015", "react", "stage-2"]
}

3.3 Update package.json

In addition, given the situation above, ensure you install the respective dependency:

npm install --save-dev babel-preset-stage-2

Cheers!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s