Remove all PropTypes in production
This commit is contained in:
parent
09914c1db4
commit
59be66f552
|
@ -71,11 +71,12 @@ MainTemplate.defaultProps = {
|
|||
globalScripts: []
|
||||
};
|
||||
|
||||
const htmlType = PropTypes.shape({
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
const htmlType = PropTypes.shape({
|
||||
__html: PropTypes.string
|
||||
});
|
||||
});
|
||||
|
||||
MainTemplate.propTypes = {
|
||||
MainTemplate.propTypes = {
|
||||
title: PropTypes.string,
|
||||
description: PropTypes.string,
|
||||
favicon: PropTypes.string,
|
||||
|
@ -86,4 +87,5 @@ MainTemplate.propTypes = {
|
|||
module: PropTypes.string,
|
||||
nomodule: PropTypes.string
|
||||
}).isRequired
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -102,17 +102,7 @@ const functions = [
|
|||
babel({ exclude: /node_modules/ }),
|
||||
json(),
|
||||
resolve(),
|
||||
commonjs({
|
||||
// namedExports: {
|
||||
// 'node_modules/react/index.js': [
|
||||
// 'createContext',
|
||||
// 'createElement',
|
||||
// 'forwardRef',
|
||||
// 'Component',
|
||||
// 'Fragment'
|
||||
// ]
|
||||
// }
|
||||
}),
|
||||
commonjs(),
|
||||
url({
|
||||
limit: 5 * 1024,
|
||||
publicPath: '/_client/',
|
||||
|
|
Loading…
Reference in New Issue