Can anyone suggest why this error might be coming up? thanks!

The electron (Chromium) developer console gives this error: "Uncaught SyntaxError: Unexpected reserved word" and refers to appentrypoint.js

clicking on appentrypoint.js in the console shows that it looks like this:

(function (exports, require, module, __filename, __dirname, process, global) { import React from 'react'; window.React = React; export default function appEntryPoint(mountNode) { React.render(<img src='http://tinyurl.com/lkevsb9' />, mountNode); } });

the actual source file for appentrypoint.js looks like this:

import React from 'react'; window.React = React; export default function appEntryPoint(mountNode) { React.render(<img src='http://tinyurl.com/lkevsb9' />, mountNode); }

The HTML file looks like this:

<!DOCTYPE html> <html> <body > <div id="root" class='section'> </div> <script src="http://localhost:3000/dist/bundle.js"></script> <script type="text/javascript"> (function () { var mountNode = document.getElementById('root'); var appEntryPoint = require('./appentrypoint.js'); appEntryPoint(mountNode); })(); </script> </body> </html>

webpack.config.base looks like this:

var path = require('path'); module.exports = { module: { loaders: [{ test: /\.jsx?$/, loaders: ['babel-loader'], exclude: /node_modules/ }] }, output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js', libraryTarget: 'commonjs2' }, resolve: { extensions: ['', '.js', '.jsx'], packageMains: ['webpack', 'browser', 'web', 'browserify', ['jam', 'main'], 'main'] }, plugins: [ ], externals: [ // put your node 3rd party libraries which can't be built with webpack here (mysql, mongodb, and so on..) ] };

and webpack.config.development looks like this: