Skip to content

Import in node #3

@SiggyF

Description

@SiggyF

You might want to import this library in node, for example for testing. This causes the following error:
TypeError: Cannot read property 'provide' of undefined

Blockly is not using node modules, or javascript modules. It assumes global variables (goog and Blockly) are present. At the moment I worked around this using the imports-loader and exports-loader from webpack. This allows the module to be imported in the browser. It does not work in node at the moment.

Suggestions or PR are welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions