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