Skip to content

less compilation in webpack #128

Closed
Closed
@mukeshsoni

Description

@mukeshsoni

I am trying to use material-ui with webpack. Doing the less compilation using less-loader using require -

require('./../node_modules/material-ui/src/less/scaffolding.less');
require('./../node_modules/material-ui/src/less/components.less');

but get this error

ERROR in ./~/css-loader!./~/less-loader!./~/material-ui/src/less/components.less
Module build failed: .lh-box-sizing is undefined
in node_modules/material-ui/src/less/core/base.less

lh-box-sizing is defined in lesshat.less mixin, which is imported in mixins.less which is imported in scaffolding.less.

Is it a problem with the less file or the way webpack less-loader is trying to load the less files?

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: stylesSpecific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions