Skip to content

Instantly share code, notes, and snippets.

@Volune
Last active September 1, 2016 06:26
Show Gist options
  • Save Volune/a73b956b2ee911b77c3cbcad5699c85d to your computer and use it in GitHub Desktop.
Save Volune/a73b956b2ee911b77c3cbcad5699c85d to your computer and use it in GitHub Desktop.
webpack-dev-server#474 example
.idea/
node_modules/
build/
console.log('Bundle loaded');
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<script src="bundle.js"></script>
</body>
</html>
{
"name": "wds474",
"version": "1.0.0",
"main": "entry.js",
"scripts": {
"server": "webpack-dev-server"
},
"license": "UNLICENSED",
"dependencies": {
"webpack": "^1.13.2",
"webpack-dev-server": "^1.15.1"
}
}
var path = require('path');
module.exports = {
entry: path.resolve(__dirname, 'entry.js'),
output: {
path: path.resolve(__dirname, 'build'),
filename: 'bundle.js'
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment