Skip to content

Instantly share code, notes, and snippets.

@cursorial
Created July 16, 2021 18:00
Show Gist options
  • Save cursorial/e37e6084f6595447e104d2adbcc933c5 to your computer and use it in GitHub Desktop.
Save cursorial/e37e6084f6595447e104d2adbcc933c5 to your computer and use it in GitHub Desktop.
const path = require('path')
module.exports = {
entry: './src/index.js',
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: [
'@babel/preset-env',
'@babel/preset-react'
]
}
}
}
]
},
resolve: {
extensions: ['.js', '.jsx']
},
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist')
},
mode: 'development',
devServer: {
contentBase: './dist',
open: true,
hot: true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment