Material-ui: Hosted devel version v3.1.0 produces "require not defined"

Created on 17 Sep 2018  路  7Comments  路  Source: mui-org/material-ui

Hosted v3.1.0 (https://unpkg.com/@material-ui/core/umd/material-ui.development.js) produces "require not defined"

Previous v3.0.3 did not do this.

I simply changed our link to the previous version:

<script src="https://unpkg.com/@material-ui/[email protected]/umd/material-ui.development.js"></script>

bug 馃悰

All 7 comments

@TrySound I have updated all the rollup dependencies, could it be linked?

This micro optimization should be done by bundler, not developer.

You should specify only production/development usage. Bundler (smart bundler) will eliminate unused stuff.

@TrySound Thanks for looking into it! I'm removing the require call. But why is it not handled by rollup? Is there is some es module on/off mode that prevents it to handle require once he sees an export/import?

@Verikon Will be fixed in v3.1.1 this weekend.

Rollup handles only ESM. Consider CJS doesn't exist with it (except commonjs plugin for node_modules).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

revskill10 picture revskill10  路  3Comments

reflog picture reflog  路  3Comments

ryanflorence picture ryanflorence  路  3Comments

FranBran picture FranBran  路  3Comments