ModusCreateOrg/webpack-react-es6-production-optimization

ERROR in ./index.js Module build failed: SyntaxError: Unexpected token (20:1)

IrineBrank opened this issue · 1 comments

webpack.config.js

const path = require('path');
const webpack = require('webpack');

module.exports = {
devtool: 'eval',
entry: './index',
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/public/',
},

module: {
loaders: [
{
test: /.js$/,
loaders: ['babel']
}
]
}
};

package.json

{
"name": "webpack-react-es6-prodbuild",
"version": "1.0.0",
"description": "",
"main": "index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/ModusCreateOrg/webpack-react-es6-production-optimization"
},
"scripts": {
"start": "webpack --progress --watch -p && nodemon index.js",
"test": "echo "Error: no test specified" && exit 1"
},
"author": "Grgur Grisogono",
"license": "ISC",
"devDependencies": {
"babel": "^6.0.15",
"babel-core": "^6.1.2",
"babel-loader": "^6.1.0",
"babel-preset-es2015": "^6.1.2",
"babel-preset-react": "~6.16.0",
"webpack": "~1.13.3"
},
"dependencies": {
"react": "~0.14.8",
"react-dom": "~0.14.8",
"react-router": "~3.0.0",
"webpack-dev-server": "~1.16.2"
}
}
index.html

<title>Hanging</title>
<script type="text/jsx" src="bundle.js"></script>

for the above code I am getting unexpected token error, and also bundle.js is not generated.

Thank you for filing this issue! ❤️

We no longer maintain this repository, but we continue to work on the most cutting-edge open source projects. You can find amazing solutions and ideas on the Modus Labs website.