mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-27 06:51:34 +08:00
parent
9667ec17bd
commit
a73d0504ca
@ -89,7 +89,7 @@
|
||||
"babel-preset-react": "^6.16.0",
|
||||
"babel-preset-stage-0": "^6.16.0",
|
||||
"bezier-easing": "^2.0.3",
|
||||
"bisheng": "^0.24.0",
|
||||
"bisheng": "^0.25.0",
|
||||
"bisheng-plugin-antd": "^0.15.0",
|
||||
"bisheng-plugin-description": "^0.1.1",
|
||||
"bisheng-plugin-react": "^0.5.0",
|
||||
@ -156,8 +156,8 @@
|
||||
"dist": "antd-tools run dist",
|
||||
"compile": "antd-tools run compile",
|
||||
"tsc": "tsc",
|
||||
"start": "bisheng start -c ./site/bisheng.config.js --no-livereload",
|
||||
"site": "bisheng build --ssr -c ./site/bisheng.config.js",
|
||||
"start": "cross-env NODE_ENV=development bisheng start -c ./site/bisheng.config.js --no-livereload",
|
||||
"site": "cross-env NODE_ENV=production bisheng build --ssr -c ./site/bisheng.config.js",
|
||||
"deploy": "antd-tools run clean && npm run site && bisheng gh-pages --push-only",
|
||||
"pub": "antd-tools run pub",
|
||||
"prepublish": "antd-tools run guard",
|
||||
|
@ -1,6 +1,8 @@
|
||||
const path = require('path');
|
||||
const CSSSplitWebpackPlugin = require('css-split-webpack-plugin').default;
|
||||
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
|
||||
module.exports = {
|
||||
port: 8001,
|
||||
source: {
|
||||
@ -61,6 +63,8 @@ module.exports = {
|
||||
};
|
||||
|
||||
config.externals = {
|
||||
react: 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
'react-router-dom': 'ReactRouterDOM',
|
||||
};
|
||||
|
||||
@ -76,4 +80,7 @@ module.exports = {
|
||||
|
||||
return config;
|
||||
},
|
||||
htmlTemplateExtraData: {
|
||||
isDev,
|
||||
},
|
||||
};
|
||||
|
@ -110,6 +110,11 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="react-content">
|
||||
{% 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 %}
|
||||
{{ content | safe }}
|
||||
</div>
|
||||
<script src="{{ root }}common.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user