WebSharper 3.0.3-alpha released

Andras Janko

Andras Janko

Dec 16, 2014

Reading time:

2 mins

Share via:

This is our first release of WebSharper 3.0-alpha with a new feature: source mapping. If you enable it on your project, you can see the F# sources in your browser and set breakpoints in it.

Source maps

  • You can enable including source maps and the required source files in a WebSharper assembly, by adding the

        <WebSharperSourceMap>True</WebSharperSourceMap>
    

    property to your project file.

  • To unpack the source maps in your web project, add this same property to the project file, and

        <staticContent>
            <mimeMap fileExtension=".fs" mimeType="text/plain" />
        </staticContent>
    

    inside the web.config file's <system.webServer> element.

  • It is also recommended to set

        <OtherFlags>--quotations-debug</OtherFlags>
    

    to have source position information inside reflected definitions available for WebSharper. Otherwise only the starting lines of functions can be mapped.

  • Single-Page Application projects are currently not supported.

  • In Google Chrome, you need to check the "Enable JavaScript source maps" setting in Developer Tools Settings.

  • For Internet Explorer, you need to have Windows 8.1 Update 1.

  • websharper.exe also has new flag -sm for source map embedding/unpacking.

Sitelets improvements

  • We added combinators to simplify writing Sitelets for sub-actions and embedding them into Sitelets for wider actions. See issue #307 for more details about these combinators.

WIG improvements

  • Added ObsoleteWithMessage function, with it you can specify a message for the obsolete warning.

Read more from

Can’t find what you were looking for? Drop us a line.

Andras Janko
Found a typo?

This blog post is hosted on GitHub here. Feel free to file a ticket or send a PR.

Newsletter

We will not spam you or give your details to anyone.