(former name: rollup-plugin-dna)
Rollup-plugin to load Holochain DNA or hApp bundle files as modules returning a string with base64 encoded binary data.
import dna from './hc-dna/languages.dna'
export const DNA = Buffer.from(dna, 'base64')
import happ from './hc-dna/workdir/my-app.happ'
export const BUNDLE = Buffer.from(dna, 'base64')npm i @coasys/rollup-plugin-holochain -D
In your rollup.config.js:
import { dna, happ } from '@coasys/rollup-plugin-holochain`
export default {
...
plugins: [
dna(),
happ()
]
}The dna plugin will only load files ending with .dna and creates an export called dna, while the happ pluging will only load files ending with .happ and it creates an export called happ.