Skip to content
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

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

Open
rebound-software opened this issue Jul 31, 2023 · 2 comments
Open

Comments

@rebound-software
Copy link

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 rebound-software changed the title Cordova app fails to run in production mode with Meteor app fails to build/run for Cordova or in production mode Jul 31, 2023
@zodern
Copy link
Owner

zodern commented Oct 25, 2023

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.

@rebound-software
Copy link
Author

rebound-software commented Oct 30, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants