|
@ -133,13 +133,15 @@ export default class Demo extends React.Component { |
|
|
const codepenPrefillConfig = { |
|
|
const codepenPrefillConfig = { |
|
|
title: `${localizedTitle} - Ant Design Demo`, |
|
|
title: `${localizedTitle} - Ant Design Demo`, |
|
|
html, |
|
|
html, |
|
|
js: state.sourceCode.replace(/import\s+\{\s+(.*)\s+\}\s+from\s+'antd';/, 'const { $1 } = antd;'), |
|
|
js: state.sourceCode |
|
|
|
|
|
.replace(/import\s+\{\s+(.*)\s+\}\s+from\s+'antd';/, 'const { $1 } = antd;') |
|
|
|
|
|
.replace("import moment from 'moment';", ''), |
|
|
css: prefillStyle, |
|
|
css: prefillStyle, |
|
|
editors: '001', |
|
|
editors: '001', |
|
|
css_external: 'https://unpkg.com/antd/dist/antd.css', |
|
|
css_external: 'https://unpkg.com/antd/dist/antd.css', |
|
|
js_external: [ |
|
|
js_external: [ |
|
|
'react@15.x/dist/react.js', |
|
|
'react@16.x/umd/react.development.js', |
|
|
'react-dom@15.x/dist/react-dom.js', |
|
|
'react-dom@16.x/umd/react-dom.development.js', |
|
|
'moment/min/moment-with-locales.js', |
|
|
'moment/min/moment-with-locales.js', |
|
|
'antd/dist/antd-with-locales.js', |
|
|
'antd/dist/antd-with-locales.js', |
|
|
].map(url => `https://unpkg.com/${url}`).join(';'), |
|
|
].map(url => `https://unpkg.com/${url}`).join(';'), |
|
|