Skip to content

Instantly share code, notes, and snippets.

"scripts": {
"dev": "webpack-dev-server --config webpack.config.js --inline",
"deploy": "webpack -p --config webpack.config.production.js"
},
webpack -p --config webpack.config.production.js
path: __dirname + '/deploy',
webpack-dev-server --config webpack.config.js --inline
new webpack.HotModuleReplacementPlugin()
{
test: /\.jsx$/,
loader: 'babel'
}
devServer: { hot: true },
devtool: 'eval',
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: 'eval',
devServer: { hot: true },
entry: ['./src/index.jsx'],
output: {
path: __dirname + '/dist',
{
"presets": ["es2015", "react"],
"env": {
"development": {
"plugins": [["react-transform", {
"transforms": [{
"transform": "react-transform-hmr",
"imports": ["react"],
"locals": ["module"]
}]