Skip to content

Instantly share code, notes, and snippets.

@purdrew
Created September 14, 2017 19:50
Show Gist options
  • Save purdrew/491333802fc1a354790049e3de954098 to your computer and use it in GitHub Desktop.
Save purdrew/491333802fc1a354790049e3de954098 to your computer and use it in GitHub Desktop.
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
</head>
<body>
<script src="bundle.js"></script>
</body>
</html>
import _ from 'lodash'
function component() {
var element = document.createElement('div');
element.innerHTML = _.join(['Hello', 'webpack'], ' ');
return element;
}
document.body.appendChild(component());
{
"name": "testbug",
"version": "0.0.1",
"description": "Test Bug",
"license": "UNLICENSED",
"main": "bundle.js",
"scripts": {
"start": "webpack-dev-server"
},
"engines": {
"node": ">=6.7.0",
"npm": ">=3.10.0"
},
"devDependencies": {
"webpack": "^2.2.0",
"webpack-dev-server": "^2.8.0"
},
"dependencies": {
"lodash": "^4.17.4"
}
}
module.exports = {
entry: './index.js',
output: 'bundle.js',
devtool: 'eval-source-map',
devServer: {
port: 8000,
host: '0.0.0.0',
stats: 'errors-only'
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment