reactjs - Blank white screen React & Webpack / Babel has been moved to babel-core -
i'm working through react tutorial , getting blank white screen during setup. blank white screen when run npm start can see blank div when inspect element.
i found similar issue here solution doesn't work me
i 1 error: node api babel has been moved babel-core. @ multi main
i've copied of exact files github files , still i'm getting.
i've tried npm uninstall babel -g still gives same error , white screen.
here webpack.config.js
module.exports = { entry: './main.js', output: { path: './', filename: 'index.js' }, devserver: { inline: true, port: 3333 }, module: { loaders: [ { test: /\.js$/, exclude: /node_modules/, loader: 'babel', query: { presets: ['es2015', 'react'] } } ] } }
here package.json
{ "name": "es6-react-setup", "version": "1.0.0", "main": "index.js", "scripts": { "start": "webpack-dev-server" }, "author": "", "license": "isc", "dependencies": { "babel-core": "^6.2.1", "babel-loader": "^6.2.0", "babel-preset-es2015": "^6.1.18", "babel-preset-react": "^6.1.18", "react": "^0.14.3", "react-dom": "^0.14.3" }, "description": "setup files react in es6 lessons" }
i tried deleting node_modules , reinstalling dependencies second time , worked me.
i think duplicate of post now: using webpack babel , babel-preset-react , babel-preset-es2015
Comments
Post a Comment