Skip to content

How to handle scripts, especially with dependencies? #107

@LordZardeck

Description

@LordZardeck

Is there a documented/supported way already for using JavaScript with widgets? I noticed that one of the native widgets adds some javascript in the template that loads an external file, stored on microapps.bigcommerce.com. My thinking is that one could simply have a file created and stored on the site's CDN, but then I wonder about dependencies. What if multiple widgets share the same dependencies, especially ones shared with the theme (lodash is the first thing that comes to mind).

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