add config file, bundle.js instead of main.js

This commit is contained in:
Michael Peters 2023-01-09 14:22:08 -08:00
parent bdb35678ae
commit 5821949e33
2 changed files with 10 additions and 1 deletions

View File

@ -11,6 +11,6 @@
</style>
</head>
<body>
<script src="./main.js"></script>
<script src="./bundle.js"></script>
</body>
</html>

9
webpack.config.js Normal file
View File

@ -0,0 +1,9 @@
const path = require('path');
module.exports = {
entry: path.resolve(__dirname, 'src', 'index.js'),
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
};