1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| var CopyWebpackPlugin = require('copy-webpack-plugin');
var copyFile = { production: [ {from: 'src/static/antd-0.12.15.min.css', to: 'antd.min.css'}, {from: 'src/static/antd-0.12.15.min.js', to: 'antd.min.js'}, {from: 'src/static/jquery-2.2.1.min.js', to: 'jquery.min.js'}, {from: 'src/static/react-15.0.1.min.js', to: 'react.min.js'}, {from: 'src/static/react-dom-15.0.1.min.js', to: 'react-dom.min.js'}, {from: 'src/static/react-update-0.14.6.min.js', to: 'react-update.min.js'}, {from: 'src/static/favicon.ico', to: 'favicon.ico'}, {from: 'src/static/moment-2.13.0.min.js', to: 'moment.min.js'}, {from: 'src/static/react-dnd-2.1.4.min.js', to: 'react-dnd.min.js'}, {from: 'src/static/react-router-1.0.3.min.js', to: 'react-router.min.js'} ], development: [ {from: 'src/static/antd-0.12.15.min.css', to: 'antd.min.css'}, {from: 'src/static/antd-0.12.15.min.js', to: 'antd.min.js'}, {from: 'src/static/jquery-2.2.1.min.js', to: 'jquery.min.js'}, {from: 'src/static/react-development-15.0.1.min.js', to: 'react.min.js'}, {from: 'src/static/react-dom-development-15.0.1.min.js', to: 'react-dom.min.js'}, {from: 'src/static/react-update-0.14.6.min.js', to: 'react-update.min.js'}, {from: 'src/static/favicon.ico', to: 'favicon.ico'}, {from: 'src/static/moment-2.13.0.min.js', to: 'moment.min.js'}, {from: 'src/static/react-dnd-2.1.4.min.js', to: 'react-dnd.min.js'}, {from: 'src/static/react-router-1.0.3.min.js', to: 'react-router.min.js'} ]};
new CopyWebpackPlugin( (runmod == 'devserver') ? copyFile.development : copyFile.production ),
|