mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 07:56:28 +08:00
Fix react externals
This commit is contained in:
parent
94c6c910ff
commit
6e78ffd0a6
@ -93,7 +93,7 @@
|
||||
"babel-preset-react": "^6.16.0",
|
||||
"babel-preset-stage-0": "^6.16.0",
|
||||
"bezier-easing": "^2.0.3",
|
||||
"bisheng": "^0.25.0",
|
||||
"bisheng": "^0.26.0",
|
||||
"bisheng-plugin-antd": "^0.15.0",
|
||||
"bisheng-plugin-description": "^0.1.1",
|
||||
"bisheng-plugin-react": "^0.5.0",
|
||||
|
@ -64,8 +64,6 @@ module.exports = {
|
||||
};
|
||||
|
||||
config.externals = {
|
||||
react: 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
'react-router-dom': 'ReactRouterDOM',
|
||||
};
|
||||
|
||||
@ -76,6 +74,11 @@ module.exports = {
|
||||
'create-react-class': 'preact-compat/lib/create-react-class',
|
||||
'react-router': 'react-router',
|
||||
});
|
||||
} else if (isDev) {
|
||||
config.externals = Object.assign({}, config.externals, {
|
||||
react: 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
});
|
||||
}
|
||||
|
||||
config.babel.plugins.push([
|
||||
|
@ -114,8 +114,6 @@
|
||||
{% if not usePreact %}
|
||||
{% if isDev %}
|
||||
<script src="https://as.alipayobjects.com/g/component/??react/15.6.1/react.js,react/15.6.1/react-dom.js"></script>
|
||||
{% else %}
|
||||
<script src="https://as.alipayobjects.com/g/component/??react/15.6.1/react.min.js,react/15.6.1/react-dom.min.js"></script>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<script src="{{ root }}common.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user