Skip to content

Instantly share code, notes, and snippets.

@jhurtadojerves
Last active July 6, 2018 01:52
Show Gist options
  • Save jhurtadojerves/d701d75df14d56c9c588b267b7dab201 to your computer and use it in GitHub Desktop.
Save jhurtadojerves/d701d75df14d56c9c588b267b7dab201 to your computer and use it in GitHub Desktop.
Webpack basic configuration from react.js
const path = require('path')
module.exports = {
mode: 'production',
entry: {
"home": path.resolve(__dirname, 'src/entries/home.js'),
},
output: {
path: path.resolve(__dirname, "dist"),
filename: 'js/[name].js',
publicPath: 'dist/',
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules)/,
loader: 'babel-loader'
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment