Skip to content

Instantly share code, notes, and snippets.

@Jatin-8898
Last active February 10, 2019 12:06
Show Gist options
  • Save Jatin-8898/d1fb78cfb0a69fa59b2470bb71c79600 to your computer and use it in GitHub Desktop.
Save Jatin-8898/d1fb78cfb0a69fa59b2470bb71c79600 to your computer and use it in GitHub Desktop.
const path = require("path");
const webpack = require('webpack');
module.exports = {
entry: path.join(__dirname, "js", "app.js"),
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
}
]
},
resolve: {
extensions: ['*', '.js', '.jsx']
},
output: {
path: path.join(__dirname, "public"),
filename: "bundle.js",
publicPath: "/"
},
plugins: [
new webpack.HotModuleReplacementPlugin()
],
devServer: {
hot: true,
historyApiFallback: true
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment