Closed valrus closed 7 years ago
Thanks for the report. I'll check it out.
It seems to do with the usage of the new ES6-style import/exports we wrote. Apparently the minifier is not too happy with them.
Apparently UglifyJS doesn't work with ES6 modules.
I'll check if using the uglify-es version helps.
Short answer: no it doesn't :-)
I know just use the following command line to produce the minified build:
uglifyjs ./dist/opentype.js > ./dist/opentype.min.js
This seems to avoid the issues with ES2015, since Uglify only sees the babelified code.
Expected Behavior
I'm trying to load the League Gothic font downloadable on this page, specifically either the leaguegothic-regular-webfont.ttf or LeagueGothic-Regular.otf files.
Current Behavior
Using the current master of opentype.js (this commit), loading either font works fine.
However, using opentype.min.js (same commit), I get the following error in the
opentype.load
callback:Steps to Reproduce (for bugs)
<script src="static/js/text/opentype.min.js"></script>
Context
This isn't too killer as my project requires loading an mp3 too, so an extra 150K or so won't be a dealbreaker, but it's weird that minification seems to have broken something.
Your Environment