Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

Commit

Permalink
醉了,用生产环境的配置发布报错。改天抽空看看~~
Browse files Browse the repository at this point in the history
  • Loading branch information
okoala committed Dec 5, 2015
1 parent 3b652b3 commit 60126d0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions build/webpack/production.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
var webpack = require('webpack')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
var webpackConfig = require('./_base')

webpackConfig.output.filename = '[name].[hash].js'

var commonChunkPlugin = new webpack.optimize.CommonsChunkPlugin(
'vendor', '[name].[hash].js'
)

commonChunkPlugin.__KARMA_IGNORE__ = true
var ExtractTextPlugin = require('extract-text-webpack-plugin')

webpackConfig.plugins.push(
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
commonChunkPlugin,
new ExtractTextPlugin('[name].[contenthash].css'),
new webpack.optimize.UglifyJsPlugin()
new ExtractTextPlugin('[name].[contenthash].css')
)

webpackConfig.eslint.failOnError = true
webpackConfig.output.filename = '[name].[hash].js'

var commonChunkPlugin = new webpack.optimize.CommonsChunkPlugin(
'vendor', '[name].[hash].js'
)

commonChunkPlugin.__KARMA_IGNORE__ = true
webpackConfig.plugins.push(commonChunkPlugin)
webpackConfig.plugins.push(new webpack.optimize.UglifyJsPlugin())

// webpackConfig.eslint.failOnError = true

module.exports = webpackConfig
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Ant Design components built with Vue.js ",
"main": "src/index.js",
"scripts": {
"deploy": "rm -rf .temp && webpack --config build/webpack/production.js --progress --colors --display-chunks && gh-pages -d .temp",
"deploy": "rm -rf .temp && webpack --config build/webpack/development.js --progress --colors --display-chunks && gh-pages -d .temp",
"start": "node docs/server.js",
"dev": "node docs/server.js & webpack --config build/webpack/development.js --progress --colors --display-chunks --display-error-details --watch",
"build": "webpack --config build/webpack/build.dev.js && webpack --config build/webpack/build.prod.js"
Expand Down

0 comments on commit 60126d0

Please sign in to comment.