Skip to content

Instantly share code, notes, and snippets.

@zilton7
Last active May 31, 2021 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zilton7/dffde146ac9bad485c94c984aea58112 to your computer and use it in GitHub Desktop.
Save zilton7/dffde146ac9bad485c94c984aea58112 to your computer and use it in GitHub Desktop.
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