Created
January 18, 2018 04:15
-
-
Save mannycolon/317aa2dd70a8a18e800ae35398628ffd 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
const HtmlWebpackPlugin = require('html-webpack-plugin') | |
const path = require('path') | |
const webpack = require('webpack') | |
module.exports = { | |
entry: ['react-hot-loader/patch', './playground/index.js'], | |
devServer: { | |
contentBase: './dist', | |
hot: true, | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /node_modules/, | |
use: { | |
loader: 'babel-loader', | |
options: { | |
babelrc: false, | |
presets: [['env', { modules: false }], 'react'], | |
plugins: [ | |
'transform-class-properties', | |
'transform-object-rest-spread', | |
'react-hot-loader/babel', | |
], | |
}, | |
}, | |
}, | |
], | |
}, | |
output: { | |
path: path.resolve(__dirname, './dist'), | |
filename: 'bundle.js', | |
}, | |
plugins: [ | |
new HtmlWebpackPlugin(), | |
new webpack.NamedModulesPlugin(), | |
new webpack.HotModuleReplacementPlugin(), | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.babelrc
package.json