Skip to content

Instantly share code, notes, and snippets.

@dictav
Last active January 5, 2017 07:23
Show Gist options
  • Save dictav/cb4a322f749fa18db7208084934d3cd2 to your computer and use it in GitHub Desktop.
Save dictav/cb4a322f749fa18db7208084934d3cd2 to your computer and use it in GitHub Desktop.
import npm from 'rollup-plugin-node-resolve'
import replace from 'rollup-plugin-replace'
export default {
entry: 'index.js',
moduleName: 'npmtest',
format: 'iife',
plugins: [
npm({
jsnext: true, // if provided in ES6
main: true, // if provided in CommonJS
browser: true, // if provided for browsers
extensions: [ '.js', '.json' ]
}),
replace({
include: 'node_modules/dictav-flatbuffers/js/flatbuffers.js',
'this.flatbuffers = flatbuffers;': 'export default flatbuffers;'
})
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment