Last active
March 2, 2020 05:32
-
-
Save iankit3/3a3d60cb8a0756581f938f6f8112980f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install --save react@0.14.7 | |
npm install --save react-dom@0.14.7 | |
npm install --save-dev webpack@1.12.12 | |
npm install webpack-dev-server@1.12.1 -g | |
npm install --save-dev babel-loader@6.2.1 | |
npm install --save-dev babel-core@6.4.5 | |
npm install --save-dev babel-preset-es2015@6.3.13 | |
npm install --save-dev babel-preset-react@6.3.13 | |
/*webpack config*/ | |
var path = require('path'); | |
var webpack = require('webpack'); | |
module.exports = { | |
entry: './main.js', | |
output: { path: __dirname, filename: 'bundle.js' }, | |
module: { | |
loaders: [ | |
{ | |
test: /.jsx?$/, | |
loader: 'babel-loader', | |
exclude: /node_modules/, | |
query: { | |
presets: ['es2015', 'react'] | |
} | |
} | |
] | |
}, | |
}; | |
/*Run webpack*/ | |
#server mode | |
webpack-dev-server --progress --colors | |
#build/normal mode | |
webpack --progress --colors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment