Skip to content

Instantly share code, notes, and snippets.

@goto-bus-stop
Last active December 3, 2018 20:32
Show Gist options
  • Save goto-bus-stop/2189c8ea9759f52c3e07897f60f66d02 to your computer and use it in GitHub Desktop.
Save goto-bus-stop/2189c8ea9759f52c3e07897f60f66d02 to your computer and use it in GitHub Desktop.
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'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment