module-format abstractions
FND opened this issue · comments
FND commented
currently we simply pass format
and moduleName
through to Rollup, which isn't ideal in terms of sustainability:
format: "cjs",
moduleName: "MYAPP"
an explicit mapping seems better and also more readily understandable:
format: "CommonJS", // case-insensitive
exports: "MYAPP"
this would also mean we could do some validation, e.g. in the example above:
CommonJS bundles do not require or use the
exports
name