Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Export util from package @material/menu #823

@pgbross

Description

@pgbross

What MDC-Web Version are you using?

0.13.0

What browser(s) is this bug affecting?

Chrome Version 60.0.3112.24 (Official Build) beta (64-bit)

What OS are you using?

Fedora 26 (Linux p5q 4.11.4-300.fc26.x86_64)

What are the steps to reproduce the bug?

  1. Write a custom framework menu adapter for, say, VueJS.
  2. import { MDCMenuFoundation, util } from '@material/menu';
  3. Use the component and observe that util is undefined.

What is the expected behavior?

The @material/menu util methods should be available for users of the package (from the dist/mdc.menu.js code) without having to import util from the node_modules folder separately. Note this change is also needed when no module system is used under the global mdc namespace where there is no workaround.

What is the actual behavior?

The util methods are unavailable and need to be imported separately when writing, say, a framework integration example.

Any other information you believe would be useful?

See mdc-drawer for example of exporting and using util in other packages.

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