Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save agzuniverse/3560e3e4970fdfcc08ce930dc8af970d to your computer and use it in GitHub Desktop.
Save agzuniverse/3560e3e4970fdfcc08ce930dc8af970d to your computer and use it in GitHub Desktop.
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
"entry": "./src/index.js",
"output": {
path: path.resolve(__dirname, 'dist'),
filename: "bundle.js"
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: "babel-loader"
},
{
test: /\css$/,
use: [
{
loader: "style-loader"
},
{
loader: "css-loader"
}
]
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: "./src/index.html"
})
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment