-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement hbs for ember-twiddle #326
Comments
Fixed by #337 |
So this didn't work in canary. I tracked down the issue and there is a bug in minification. Disabled the minification of assets/vendor.js in canary for now. Help wanted. |
To reproduce:
|
This is the error: TypeError: application/template.hbs: The plugin function (t){var r=t.types,n=function(t,r){var n="Ember.HTMLBars.template("+e(r)+")";return t.replaceWithSourceString?void t.replaceWithSourceString(n):n};return new t.Transformer("htmlbars-inline-precompile",{ImportDeclaration:function(e,t,n,i){if(r.isLiteral(e.source,{value:"htmlbars-inline-precompile"})){var a=e.specifiers&&e.specifiers[0];if(!r.isImportDefaultSpecifier(a)){var o=i.code,s=o.slice(e.start,e.end),l="Only |
Turning off name mangling in uglify also fixes the issue. To do so, use
|
Issue was with Babel requiring constructor.name === "Plugin" but the Plugin class constructor function's name was mangled by Uglify. Fixed by treating 'Plugin' as reserved word during minification. |
wow, awesome detective work @Gaurav0 🔍 |
@pangratz Now should I report it as a bug to Babel or Uglify or both? |
I would say this is an uglify issue |
@pangratz Reported |
@pangratz description of hbs: emberjs/ember-test-helpers#38 (comment)
See https://canary.ember-twiddle.com/4913a319b3647c2c696d?openFiles=tests.integration.better-checkbox-test.js%2Cbetter-checkbox.component.js
The text was updated successfully, but these errors were encountered: