rollup-plugin-bundle-inject
Version:
Inject JS or CSS bundle into a template where necessary
12 lines (10 loc) • 394 B
HTML
<html><head><title>Rollup bundle inject example</title><meta charset=utf-8><style>body {
font-size: 14px;
background-color: orange;
color: white;
}</style></head><body><h1>Hello World!</h1><script>;
function sum(a, b) {
return a + b;
}
const result = sum(1, 2);
document.body.appendChild(document.createTextNode(`1 + 2 = ${result}`));</script></body></html>