Skip to content

Instantly share code, notes, and snippets.

@iankit3
Last active March 2, 2020 05:32
Show Gist options
  • Save iankit3/3a3d60cb8a0756581f938f6f8112980f to your computer and use it in GitHub Desktop.
Save iankit3/3a3d60cb8a0756581f938f6f8112980f to your computer and use it in GitHub Desktop.
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