refactor: all in with material-ui (#23)

This commit is contained in:
Miralem Drek
2019-05-07 16:24:06 +02:00
committed by GitHub
parent cc09554b62
commit dbdc279d2c
63 changed files with 1587 additions and 1497 deletions

View File

@@ -36,6 +36,30 @@ const GLOBALS = {
const EXTERNALS = [
'react',
'react-dom',
'@material-ui/core',
'@material-ui/styles',
];
const propTypes = [
'array',
'bool',
'func',
'number',
'object',
'string',
'symbol',
'any',
'arrayOf',
'element',
'instanceOf',
'node',
'objectOf',
'oneOf',
'oneOfType',
'shape',
'exact',
'elementType',
];
const config = (isEsm) => {
@@ -73,8 +97,24 @@ const config = (isEsm) => {
}),
commonjs({
namedExports: {
react: ['useState', 'useEffect', 'useRef', 'useContext', 'useCallback', 'useMemo', 'createElement', 'PureComponent'],
'react-dom': ['createPortal'],
react: [
'useState',
'useEffect',
'useRef',
'useContext',
'useCallback',
'useMemo',
'createElement',
'PureComponent',
'isValidElement',
'Children',
'cloneElement',
],
'react-dom': ['createPortal', 'findDOMNode'],
'react-is': ['ForwardRef'],
'react-transition-group/node_modules/prop-types/index.js': propTypes,
'prop-types/index.js': propTypes,
'@material-ui/utils/node_modules/prop-types': propTypes,
},
}),
babel({