odin-codespace/restaurant/webpack.config.js

33 lines
664 B
JavaScript
Raw Normal View History

2023-12-18 16:19:02 -05:00
const path = require('path');
2023-12-18 17:54:59 -05:00
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
mode: 'development',
entry: {
index: './src/index.js',
},
plugins: [
new HtmlWebpackPlugin({
title: 'Restaurant - Dev',
}),
],
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
clean: true,
},
devtool: 'inline-source-map',
devServer: {
static: './dist',
},
2023-12-18 20:09:54 -05:00
module: {
rules: [
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
],
},
2023-12-18 17:54:59 -05:00
};
2023-12-18 16:19:02 -05:00