Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/cdn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ which is great for prototyping. We discourage using this approach in production
the client has to download the entire library, regardless of which components are actually used,
affecting performance and bandwidth utilisation.

[The live preview.](https://codesandbox.io/s/github/mui-org/material-ui/tree/master/examples/cdn)

## UMD releases

We are providing two Universal Module Definition (UMD) files:
Expand Down
7 changes: 7 additions & 0 deletions examples/cdn/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "cdn",
"version": "3.0.0",
"private": true,
"dependencies": {},
"scripts": {}
}
4 changes: 2 additions & 2 deletions packages/material-ui-utils/src/componentPropType.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const ReactIs = require('react-is');
import { isValidElementType } from 'react-is';

/**
* A factory that returns a propTypes validator that only accepts values that
Expand All @@ -25,7 +25,7 @@ function createComponentProp(isRequired) {
`The ${location} \`${propName}\` is marked as required in \`${componentName}\`, ` +
`but its value is \`${typeof prop}\`.`;
}
} else if (!ReactIs.isValidElementType(prop)) {
} else if (!isValidElementType(prop)) {
const preciseType = typeof prop;
message =
`Invalid ${location} \`${propName}\` of type \`${preciseType}\` ` +
Expand Down
3 changes: 3 additions & 0 deletions packages/material-ui/scripts/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ const babelOptions = {
const commonjsOptions = {
ignoreGlobal: true,
include: /node_modules/,
namedExports: {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'../../node_modules/react-is/index.js': ['isValidElementType'],
},
};

export default [
Expand Down