fix build error

This commit is contained in:
zuiidea
2017-07-30 14:25:04 +08:00
parent 057853cfde
commit 52ee780e40
15 changed files with 14 additions and 10 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ export default {
svgSpriteLoaderDirs : svgSpriteDirs,
theme : "./theme.config.js",
publicPath : `/${version}/`,
outputPath : `./dist/${version}/`,
outputPath : `./dist/${version}`,
// 接口代理示例
// "proxy": {
// "/api/v1": {
+1
View File
@@ -7,6 +7,7 @@
"axios": "^0.16.2",
"babel-polyfill": "^6.23.0",
"classnames": "^2.2.5",
"copy-webpack-plugin": "^4.0.1",
"d3-shape": "^1.2.0",
"draftjs-to-markdown": "^0.4.0",
"dva": "^1.2.0",

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

+3 -3
View File
@@ -49,9 +49,9 @@ const IcoPage = () => (<div className="content-inner">
</ul>
<h2 style={{ margin: '16px 0' }}>Local Require SVG</h2>
<ul className={styles.list}>
{localRequireSVGIcons.map(item => (<li key={item}>
<Iconfont className={styles.icon} colorful type={item} />
<span className={styles.name}>{item}</span>
{localRequireSVGIcons.map(item => (<li key={item.default.id}>
<Iconfont className={styles.icon} colorful type={item.default.id} />
<span className={styles.name}>{item.default.id}</span>
</li>))}
</ul>
<h2 style={{ margin: '16px 0' }}>API</h2>
+9 -6
View File
@@ -1,5 +1,6 @@
const HtmlWebpackPlugin = require('html-webpack-plugin')
const HtmlWebpackTemplate = require('html-webpack-template')
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = (webpackConfig, env) => {
// FilenameHash
@@ -27,8 +28,13 @@ module.exports = (webpackConfig, env) => {
// loader: 'eslint',
// }]
webpackConfig.plugins = webpackConfig.plugins.concat([
new CopyWebpackPlugin([
{
from: 'src/public',
to: env === 'production' ? '../' : webpackConfig.output.outputPath,
},
]),
new HtmlWebpackPlugin({
hash: true,
mobile: true,
@@ -40,15 +46,12 @@ module.exports = (webpackConfig, env) => {
minify: {
collapseWhitespace: true,
},
scripts: env === 'production' ? null : [
'roadhog.dll.js',
],
scripts: env === 'production' ? null : ['roadhog.dll.js'],
meta: [
{
name: 'description',
content: 'A admin dashboard application demo built upon Ant Design and Dva.js',
},
{
}, {
name: 'viewport',
content: 'width=device-width, initial-scale=1.0',
},