21 lines
468 B
JavaScript
21 lines
468 B
JavaScript
import _ from "lodash";
|
|
import "./style.css";
|
|
import Icon from './ship.png';
|
|
|
|
function component() {
|
|
const element = document.createElement("div");
|
|
|
|
// Lodash, currently included via a script, is required for this line to work
|
|
element.innerHTML = _.join(["Hello", "webpack"], " ");
|
|
element.classList.add("hello");
|
|
|
|
const myIcon = new Image();
|
|
myIcon.src = Icon;
|
|
|
|
element.appendChild(myIcon);
|
|
|
|
return element;
|
|
}
|
|
|
|
document.body.appendChild(component());
|