Abandon dynamic loading for browser contexts · Issue #116 · mapnik/mapnik-reference · GitHub
Skip to content

Abandon dynamic loading for browser contexts #116

Description

@nebulon42

I'm currently attempting browserification of Carto and mapnik-reference will have to change too to support it. Dynamic loading i.e. using require with variables is not supported in a browser context.

So we would have to move to requiring all versions explicitly. This has the obvious downside that all versions have to be loaded, which may not be necessary outside of a browser context. Another possibility would be to detect if being in a browser context (e.g. http://stackoverflow.com/a/31090240) and only then requiring all the versions.

I can provide a patch, but the general direction would have to be clarified first.
Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions