Rabet,
? , . , babel-loader.
webpack ES6 ( ).
, .
import path from 'path'
export default {
entry:['./js/app.js',
],
output: {
filename: 'bundle.js',
path: path.join(__dirname, 'build'),
publicPath: 'http://localhost:8080/',
},
module: {
loaders: [{
test: /\.js$/,
exclude: /node_modules/,
loaders: ['react-hot', 'babel'],
}],
},
}
package.json
{
"name": "Todo_tutorial",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack --colors --progress",
"start": "webpack-dev-server --hot --inline --color --progress "
},
"author": "",
"license": "ISC",
"dependencies": {
"react": "^0.14.0"
},
"devDependencies": {
"babel-core": "^5.8.25",
"babel-loader": "^5.3.2",
"flux": "^2.1.1",
"webpack": "^1.12.2",
"webpack-dev-server": "^1.12.0"
}
}
: https://medium.com/@ColeMurray/react-flux-in-es6-pt-1-2-e2a7b4aa074e