npm install
npx rollup -c
The only error I get is about the missing assert
dependency, which is expected, you need rollup-plugin-node-builtins
for that.
import html from'nanohtml' | |
import morph from'nanomorph' | |
morph(document.body, html` | |
<body> | |
<div id="test"> | |
<h1>Hello world</h1> | |
</div> | |
</body> | |
`) |
{ | |
"dependencies": { | |
"nanohtml": "^1.3.0", | |
"nanomorph": "^5.1.3", | |
"rollup": "^0.67.4", | |
"rollup-plugin-commonjs": "^9.2.0", | |
"rollup-plugin-node-resolve": "^3.4.0" | |
} | |
} |
import commonjs from 'rollup-plugin-commonjs' | |
import resolve from 'rollup-plugin-node-resolve' | |
export default { | |
input: './app.js', | |
plugins: [ | |
resolve({ browser: true }), | |
commonjs() | |
], | |
output: { | |
format: 'umd', | |
name: 'repro', | |
file: 'bundle.js' | |
} | |
} |