• Does it handle require ok?

    Yes, it just needs a plugin to handle that and as the showcase is to actually use the ES6 import they just don't have it in (rollup-plugin-commonjs). I had a look at that and it would require changes to be able to work in the browser but nothing too complicated IMO. Also the terser (uglifyjs-es successor) should not be a big problem to put in.

    In order to use the tree shaking functionality though the ES6 import needs to be used (more on that here https://rollupjs.org/guide/en#tree-shaki­ng). That I find quite fine to use in the application code. The modules usually do not import other module parts. We could go even further IMO perhaps as far as saying that const connect = require('SSD1106').connect is the same as import { connect } from 'SSD1106'; (but that is just a thought for the future implications of which would have to be investigated first).

    I saw one of the examples uses Object.freeze ...

    It is used for the import * as xyz functionality and there the Object.freeze use can be turned off (see an example in the repo at https://github.com/rollup/rollup/blob/c3­228cde9f4358ec08c349bef123b3289e33b8d3/t­est/form/samples/freeze/_config.js)

About

Avatar for opichals @opichals started