Skip to content

Use Materialize as modular components #5958

@geosigno

Description

@geosigno

Hi,

I have a lot of issue to have materialize working as modular component. I don't want to have to load the entire JS library (almost 200KB) but only some components.

I was used to Foundation, which was working very simply. But with Materialize, everytime I want to add some component, it is long process to find which component need which dependency.

For example the Modal component

import 'materialize-css/js/modal';

Then I got the error Cash is not defined, so:

import 'materialize-css/js/cash';
import 'materialize-css/js/modal';

Then I got the Component is not defined, so again:

import 'materialize-css/js/component';
import 'materialize-css/js/cash';
import 'materialize-css/js/modal';

But here, I am still getting the issue.

I know several issues have already been reported, but none of them has been abe to help me so far...

Is there (probably) a better to achieve what I am trying to do?

I can't find a dependency documentation, which will list all module interdependency. Is this plan?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions