Sourcemaps with sso linker

154 visningar
Hoppa till det första olästa meddelandet

Dmitry Skavish

oläst,
11 maj 2016 21:42:362016-05-11
till Google Web Toolkit
hi everybody,

I could not figure out how do I build my app and generate sourcemap
url into js file along with all the sources. Anybody can shed some
light here?

That's what I did:

1. I added <set-property name="compiler.useSourceMaps" value="true"/>
to my module and now I have sourcemaps generated.

2. Now if I want to use it I need to manually add the path to the map
to my generated js file, something like that:

//# sourceMappingURL=../WEB-INF/deploy/playerDebug/symbolMaps/AE31C96E973F2818434AA5B24477E385_sourceMap0.json

3. Adding the path gives me the mapping to java classes, but since
there is no sources available it's kind of useless. How do I specify
path to the sources? Is there anyway I can add it to js file?

Is there anyway to automate step 2?

Note that I am just opening the module's html in browser as local
file, not via webserver.

thanks!

--
Dmitry Skavish

Thomas Broyer

oläst,
12 maj 2016 05:09:102016-05-12
till GWT Users


On Thursday, May 12, 2016 at 3:42:36 AM UTC+2, Dmitry Skavish wrote:
hi everybody,

I could not figure out how do I build my app and generate sourcemap
url into js file along with all the sources. Anybody can shed some
light here?

That's what I did:

1. I added <set-property name="compiler.useSourceMaps" value="true"/>
to my module and now I have sourcemaps generated.

2. Now if I want to use it I need to manually add the path to the map
to my generated js file, something like that:

//# sourceMappingURL=../WEB-INF/deploy/playerDebug/symbolMaps/AE31C96E973F2818434AA5B24477E385_sourceMap0.json

3. Adding the path gives me the mapping to java classes, but since
there is no sources available it's kind of useless. How do I specify
path to the sources? Is there anyway I can add it to js file?

Is there anyway to automate step 2?

Yes; the GWT website does that for instance.
You have to add something like the following to your gwt.xml:
<set-configuration-property name="includeSourceMapUrl" 

__HASH__ and __FRAGMENT__ will be replaced with the appropriate values.

You may also want to pass -saveSource to the GWT compiler so it dumps on disk the source files it used (including those produced by GWT generators during the compilation).

 
Note that I am just opening the module's html in browser as local
file, not via webserver.

I'm afraid some things won't work in this setup (I can't tell if it'll change anything to source maps though); try to use a web server (even if only a "python -m SimpleHTTPServer")

Dmitry Skavish

oläst,
12 maj 2016 13:39:302016-05-12
till Google Web Toolkit
Thanks Thomas! Looks like the url is not inserted if I use sso linker.
Is it known issue?
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-tool...@googlegroups.com.
> To post to this group, send email to google-we...@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.



--
Dmitry Skavish

cristian607

oläst,
13 juni 2020 10:16:142020-06-13
till GWT Users
Hi guys!

I am interested by this as well, and see that indeed it doesn't work w/ sso linker. Is there a way to have the sourcemap url inserted, when using sso linker?
I'm migrating some code to a TS app, and I am keeping some valuable GWT code as a "normal" JS lib, consumable from the TS app.

Thanks in advance!
Cristian
Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden