Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
example-webpack.config.js
const path = require('path');
module.exports = {
mode: 'development',
entry: './src/index.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, './'),
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
],
},
devServer: {
contentBase: path.resolve(__dirname, 'dist'),
port: 3000,
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment