minify-js-sourcemaps icon indicating copy to clipboard operation
minify-js-sourcemaps copied to clipboard

Meteor app fails to build/run for Cordova or in production mode

Open rebound-software opened this issue 2 years ago • 3 comments

I'm also seeing an issue when using zodern:standard-minifier-js for source map support for my app when building for cordova or with --production. With the normal meteor minifier, my app builds and runs ok. On startup, I'm getting this error:

Uncaught SyntaxError: Unexpected identifier 'o' (at e04e63491b71d3312668bf6772e33ff56210d9ac.js?meteor_js_resource=true:4474:51)

Which is from this code:

${t.toSourceMapGenerator(e,r).toJsComment()}`}

let o=sf(...s.concat(i));return this.executeFunction(o,a)}executeFunction(e,t) ^^^^^^

{return e(...t)}}class sg extends sp{constructor(e){super(),this.reflector=e,this._evalArgNames=[],this._evalArgValues=[],this._evalExportedVars=[]}createReturnStmt(e){let t=new tJ(new tz(this._evalExportedVars.map(e=>new tU(e,nl(e),!1))));t.visitStatement(this,e)}getArgs(){let e={};for(let t=0;t<this._evalArgNames.length;t++)e[this._evalArgNames[t]]=this._evalArgValues[t];return e}visitExternalExpr(e,t){return this._emitReferenceToExternal(e,this.reflector.resolveExternalReference(e.value),t),null}visitWrappedNodeExpr(e,t){return this._emitReferenceToExternal(e,e.node,t),null}visitDeclareVarStmt(e,t){return e.hasModifier(eN.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareVarStmt(e,t)}visitDeclareFunctionStmt(e,t){return e.hasModifier(eN.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareFunctionStmt(e,t)}visitDeclareClassStmt(e,t){return e.hasModifier(eN.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareClassStmt(e,t)}_emitReferenceToExternal(e,t,n){let r=this._evalArgValues.indexOf(t);if(-1===r){r=this._evalArgValues.length,this._evalArgValues.push(t);let e=sc({reference:t})||"val";this._evalArgNames.push(jit_${e}_${r})}n.print(e,this._evalArgNames[r])}}/**

I don't think it's related to issue #23 as I still get the problem without hide-production-sourcemaps installed.

Happy to provide more info If you can let me know what else I can do to help debug the issue...

rebound-software avatar Jul 31 '23 21:07 rebound-software

Could you please try again with version 5.2.0? SWC had a large number of bug fixes in the minifier which probably fixed this.

zodern avatar Oct 25 '23 22:10 zodern

Sill broken for me with 5.2.0 with the same error. Is there anything more I can provide to debug?

On 25 Oct 2023, at 23:13, zodern @.***> wrote:

Could you please try again with version 5.2.0? SWC had a large number of bug fixes in the minifier which probably fixed this.

— Reply to this email directly, view it on GitHubhttps://github.com/zodern/minify-js-sourcemaps/issues/39#issuecomment-1780129145, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AI3XBIP2E5P774WMRIJZWCTYBGFHFAVCNFSM6AAAAAA26227Y2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBQGEZDSMJUGU. You are receiving this because you authored the thread.Message ID: @.***>

rebound-software avatar Oct 30 '23 16:10 rebound-software