The code that provided in package.json.module / package.json.es:next needs to be a valid es5 code, except of the es6 modules syntax. (as rollup guidelines )
Currently its contain other es6 features as arrow functions.
When Uglifying js code that contains also dexie code it breaks with that following error:
SyntaxError: Unexpected token: operator (>) because of an error function
That error didn't happen with dexie beta.7 but with beta.9
Rollup guidelines
https://github.com/rollup/rollup/wiki/pkg.module#wait-it-just-means-import-and-export--not-other-future-javascript-features
Thanks for the info @Bnaya . I guess we shouldn't target es2015 in the build script, just es2015 modules and target es5 for the rest.
The name of the module (currently dexie.es6.js) is inaccurate if so. Seems we should name it dexie.jsm?
Using extension dexie.es.js instead of dexie.jsm. Reasons:
(Previous releases did have dexie.es6.js)
Side note: Now also configured the addons to produce es.js outputs.
Most helpful comment
Using extension
dexie.es.jsinstead ofdexie.jsm. Reasons:(Previous releases did have
dexie.es6.js)