diff --git a/build/webpack.config.dev.js b/build/webpack.config.dev.js index 377466cbfa6..97506c1d4bf 100644 --- a/build/webpack.config.dev.js +++ b/build/webpack.config.dev.js @@ -1,7 +1,7 @@ const path = require('path'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); -const ExtractTextPlugin = require('extract-text-webpack-plugin'); +const MiniCssExtractPlugin = require('mini-css-extract-plugin') const ProgressBarPlugin = require('progress-bar-webpack-plugin'); const isProduction = process.env.NODE_ENV === 'production'; @@ -41,25 +41,23 @@ module.exports = { { loader: 'vue-loader', options: { - preserveWhitespace: false, - extractCSS: true + preserveWhitespace: false } } ] }, { test: /\.js$/, - exclude: /node_modules|vue-router\/|vue-loader\//, + exclude: /node_modules/, use: 'babel-loader' }, { test: /\.css$/, - use: ExtractTextPlugin.extract({ - use: [ - 'css-loader', - 'postcss-loader' - ] - }) + use: [ + MiniCssExtractPlugin.loader, + 'css-loader', + 'postcss-loader' + ] }, { test: /\.md/, @@ -69,7 +67,7 @@ module.exports = { ] }, { - test: /\.(woff2?|eot|ttf|otf|svg)(\?.*)?$/, + test: /\.(woff2?|eot|ttf|svg)(\?.*)?$/, loader: 'url-loader' } ] @@ -88,9 +86,8 @@ module.exports = { filename: 'examples.html', inject: true }), - new ExtractTextPlugin({ - filename: isProduction ? '[name].[hash:8].css' : '[name].css', - allChunks: true + new MiniCssExtractPlugin({ + filename: isProduction ? '[name].[hash:8].css' : '[name].css' }) ] }; diff --git a/package.json b/package.json index d63f7b96382..6d84254e23d 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,6 @@ "dependency-tree": "^6.1.0", "eslint": "^4.19.1", "eslint-plugin-vue": "^4.5.0", - "extract-text-webpack-plugin": "^4.0.0-beta.0", "fast-vue-md-loader": "^1.0.3", "gh-pages": "^1.0.0", "html-webpack-plugin": "3.2.0", @@ -93,6 +92,7 @@ "karma-spec-reporter": "^0.0.32", "karma-webpack": "3.0.0", "lint-staged": "^7.0.4", + "mini-css-extract-plugin": "^0.4.0", "mocha": "^5.1.1", "postcss": "^6.0.21", "postcss-calc": "^6.0.0", diff --git a/packages/vant-css/package.json b/packages/vant-css/package.json index fd6c391340f..cb45edb235b 100644 --- a/packages/vant-css/package.json +++ b/packages/vant-css/package.json @@ -14,13 +14,13 @@ }, "license": "MIT", "devDependencies": { - "autoprefixer": "^7.1.4", + "autoprefixer": "^8.3.0", "gulp": "^3.9.1", "gulp-clean-css": "^3.9.0", "gulp-iconfont": "^9.0.2", "gulp-iconfont-css": "^2.1.0", "gulp-postcss": "^7.0.0", - "md5-file": "^3.2.3", + "md5-file": "^4.0.0", "postcss-easy-import": "^3.0.0", "precss": "^2.0.0" } diff --git a/packages/vant-css/yarn.lock b/packages/vant-css/yarn.lock index 4faa1617054..1881fb1558c 100644 --- a/packages/vant-css/yarn.lock +++ b/packages/vant-css/yarn.lock @@ -163,15 +163,15 @@ atob@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.0.tgz#ab2b150e51d7b122b9efc8d7340c06b6c41076bc" -autoprefixer@^7.1.4: - version "7.2.6" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.2.6.tgz#256672f86f7c735da849c4f07d008abb056067dc" +autoprefixer@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-8.3.0.tgz#22ac5151c3c8946bb8f75f337d5c5042c0ec6404" dependencies: - browserslist "^2.11.3" - caniuse-lite "^1.0.30000805" + browserslist "^3.2.4" + caniuse-lite "^1.0.30000830" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^6.0.17" + postcss "^6.0.21" postcss-value-parser "^3.2.3" aws-sign2@~0.7.0: @@ -264,27 +264,12 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" -browserslist@^2.11.3: - version "2.11.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.3.tgz#fe36167aed1bbcde4827ebfe71347a2cc70b99b2" +browserslist@^3.2.4: + version "3.2.5" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.5.tgz#aa46a5ea33b5330178f3c91cfd85e148fcb57080" dependencies: - caniuse-lite "^1.0.30000792" - electron-to-chromium "^1.3.30" - -buffer-alloc-unsafe@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-0.1.1.tgz#ffe1f67551dd055737de253337bfe853dfab1a6a" - -buffer-alloc@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.1.0.tgz#05514d33bf1656d3540c684f65b1202e90eca303" - dependencies: - buffer-alloc-unsafe "^0.1.0" - buffer-fill "^0.1.0" - -buffer-fill@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-0.1.1.tgz#76d825c4d6e50e06b7a31eb520c04d08cc235071" + caniuse-lite "^1.0.30000830" + electron-to-chromium "^1.3.42" bufferstreams@^1.0.2, bufferstreams@^1.1.0: version "1.1.3" @@ -325,7 +310,7 @@ camelcase@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" -caniuse-lite@^1.0.30000792, caniuse-lite@^1.0.30000805: +caniuse-lite@^1.0.30000830: version "1.0.30000830" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000830.tgz#cb96b8a2dd3cbfe04acea2af3c4e894249095328" @@ -600,7 +585,7 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" -electron-to-chromium@^1.3.30: +electron-to-chromium@^1.3.42: version "1.3.42" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.42.tgz#95c33bf01d0cc405556aec899fe61fd4d76ea0f9" @@ -1706,11 +1691,9 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -md5-file@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/md5-file/-/md5-file-3.2.3.tgz#f9bceb941eca2214a4c0727f5e700314e770f06f" - dependencies: - buffer-alloc "^1.1.0" +md5-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/md5-file/-/md5-file-4.0.0.tgz#f3f7ba1e2dd1144d5bf1de698d0e5f44a4409584" meow@^3.3.0: version "3.7.0" @@ -2300,7 +2283,7 @@ postcss@^5.0.10, postcss@^5.0.4, postcss@^5.0.5: source-map "^0.5.6" supports-color "^3.2.3" -postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.11, postcss@^6.0.13, postcss@^6.0.14, postcss@^6.0.17, postcss@^6.0.18, postcss@^6.0.3, postcss@^6.0.9: +postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.11, postcss@^6.0.13, postcss@^6.0.14, postcss@^6.0.18, postcss@^6.0.21, postcss@^6.0.3, postcss@^6.0.9: version "6.0.21" resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.21.tgz#8265662694eddf9e9a5960db6da33c39e4cd069d" dependencies: diff --git a/yarn.lock b/yarn.lock index a9fe6c72237..548d49b68fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5696,6 +5696,13 @@ mimic-response@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.0.tgz#df3d3652a73fded6b9b0b24146e6fd052353458e" +mini-css-extract-plugin@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.0.tgz#ff3bf08bee96e618e177c16ca6131bfecef707f9" + dependencies: + loader-utils "^1.1.0" + webpack-sources "^1.1.0" + minimalistic-assert@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"