[Improvement] optimize build speed (#355)

* fix: Tabbar icon line-height

* [new feature] progress add showPivot prop

* [new feature] TabItem support vue-router

* [new feature] update document header style

* [Doc] add toast english ducoment

* [bugfix] Search box-sizing wrong

* [Doc] update vant-demo respo

* [Doc] translate theme & demo pages

* [Doc] add Internationalization document

* [bugfix] remove unnecessary props

* [fix] optimize clickoutside

* [new feature] optimize find-parent

* [new feature]: change document title accordinng to language

* [new feature] Pagination code review

* [improvement] adjust icon-font unicode

* [improvement] Icon spinner color inherit

* [improvement] icon default width

* [bugfix] DateTimePicker validate date props

* [bugfix] Tab item text ellipsis

* [improvement] optimize single line ellipsis

* [Improvement] optimzie staticClass

* [Improvement] Button: use sfc instread of jsx

* [Improvement] update actionsheet close icon style

* fix: yarn.lock

* fix: icon test cases

* [bugfix] errors during ssr

* [Improvement] SubmitBar add left slot

* [new feature] ImagePreview support manually close

* fix: ImagePreview test case

* [Doc] add switch lang button in mobile

* [bugfix] Popup overlay style update

* [bugfix] NavBar click event

* [Improvement] optimize build speed
This commit is contained in:
neverland
2017-11-27 14:58:29 +08:00
committed by GitHub
parent 03aef579ad
commit a0acfd9f7f
4 changed files with 34 additions and 162 deletions

View File

@@ -1,15 +1,10 @@
const webpack = require('webpack');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');
const isProduction = process.env.NODE_ENV === 'production';
const docConfig = require('../docs/src/doc.config');
const styleLoaders = [
{ loader: 'css-loader' },
{ loader: 'postcss-loader', options: { sourceMap: true } }
];
module.exports = {
entry: {
@@ -53,16 +48,7 @@ module.exports = {
loader: 'vue-loader',
options: {
preserveWhitespace: false,
loaders: {
postcss: ExtractTextPlugin.extract({
use: styleLoaders,
fallback: 'vue-style-loader'
}),
css: ExtractTextPlugin.extract({
use: styleLoaders,
fallback: 'vue-style-loader'
})
}
extractCSS: true
}
}
]
@@ -70,18 +56,25 @@ module.exports = {
{
test: /\.js$/,
exclude: /node_modules|vue-router\/|vue-loader\//,
loader: 'babel-loader'
use: [
'babel-loader'
]
},
{
test: /\.css$/,
use: ExtractTextPlugin.extract({ use: styleLoaders })
use: ExtractTextPlugin.extract({
use: [
'css-loader',
'postcss-loader'
]
})
},
{
test: /\.md/,
loader: 'vue-markdown-loader',
options: {
preventExtract: true
}
use: [
'vue-loader',
'fast-vue-md-loader'
]
},
{
test: /\.(woff2?|eot|ttf|otf|svg)(\?.*)?$/,