[Pas2js] Force pas2js to transpile unused code
Mattias Gaertner
nc-gaertnma at netcologne.de
Thu Dec 17 18:12:16 CET 2020
On Thu, 17 Dec 2020 18:10:48 +0100
Mattias Gaertner via Pas2js <pas2js at lists.freepascal.org> wrote:
> On Thu, 17 Dec 2020 10:06:40 -0700 (MST)
> imperyal <imperyal at gmail.com> wrote:
>
> > In my use case, I call lots of functions from other JS code only,
> > not within the pascal code.
> > I already tried -O- option on pas2js.cfg file. No luck.
> >
> > I'm using Lazarus with pas2js.
>
> Lazarus passes by default -O1.
>
> Add the -O- in Project / Project Options / Compiler Options / Custom
> Options.
Or better, add somewhere:
var dummy: jsvalue;
begin
dummy:=@YourExportFunction1;
dummy:=@YourExportFunction2;
...
Mattias
More information about the Pas2js
mailing list