-
-
Save velotiotech/cfb3da40bdef656ba789a1c778e396eb 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
// webpack.config.js | |
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', | |
}, | |
], | |
}, | |
plugins: [ | |
new HtmlWebpackPlugin({ | |
template: 'public/index.html', | |
}), | |
], | |
devServer: { | |
static: path.resolve(__dirname, 'public'), | |
port: 3000, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment