ruanyf/webpack-demos

demo3 ERROR in ./main.jsx

youmyyou opened this issue · 2 comments

Module build failed: Error: Couldn't find preset "es2015" relative to directory
why?

Step One: If your webpack is v2.x, remove it and install v1.x.

Step Two: delete node_modules directory under the project root and re-install dependencies.

$ npm install

thank you!
I fixed it by adding a .babelrc file.
{ "presets": ["es2015", "react"] }