Skip to content

dist version throws an error #2

Description

@joepadmiraal

When running pnpm dev, the example page works fine and shows the dropdown button without any errors in the console.

However when I include the <script src="//cdn.jsdelivr.net/npm/docsify-page-actions-menu@latest"></script> script on my Docsify page, or when I try to use the demo page from this repository I am seeing this error:

Docsify plugin error TypeError: can't access property "button", e.config.pageActionItems is undefined

For the demo page, I'm doing the following.
Run http-server -p 5173 and open http://127.0.0.1:5173/demo/#/
The page loads dist/index.umd.js without issues, but the error is shown in the console and no button is shown.

When I do an pnpm build and open the page again it does work.

So I suspect the pre-build version of this plugin has an issue, and that same version is being hosted via jsdelivr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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