Skip to content

Instantly share code, notes, and snippets.

@SteveSandersonMS
Created December 6, 2019 14:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save SteveSandersonMS/b6e1e2db31ba12fd0c7ae288dc61660f to your computer and use it in GitHub Desktop.
Trivial webpack setup
console.log('Hello, world!');
{
"name": "webpack-sample",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack",
"build:watch": "webpack --watch"
},
"author": "",
"license": "ISC",
"devDependencies": {
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10"
}
}
const path = require('path');
module.exports = {
entry: './index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
mode: 'development'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment