From 2feeb67b3f9bb6e00fd4d798314c5efc318f7201 Mon Sep 17 00:00:00 2001 From: Yao Date: Thu, 11 May 2017 15:58:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=8F=98=E6=89=93=E5=8C=85=E5=87=BA?= =?UTF-8?q?=E6=9D=A5=E7=9A=84amd=E6=A8=A1=E5=9D=97=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0amd=E6=A8=A1=E5=9D=97=E7=9A=84=E5=90=8D=E5=AD=97=20(#2?= =?UTF-8?q?8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add amd name --- build/webpack.build.js | 3 ++- build/webpack.components.js | 3 ++- build/webpack.config.dev.js | 3 ++- build/webpack.config.prod.js | 3 ++- yarn.lock | 6 ++++++ 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/build/webpack.build.js b/build/webpack.build.js index c0e0b91da..6b3a3ad0d 100644 --- a/build/webpack.build.js +++ b/build/webpack.build.js @@ -9,7 +9,8 @@ config.entry = { config.output = { filename: './lib/[name].js', library: 'vant', - libraryTarget: 'umd' + libraryTarget: 'umd', + umdNamedDefine: true }; config.externals = { diff --git a/build/webpack.components.js b/build/webpack.components.js index f7ab1d9cf..b0b2b91e2 100644 --- a/build/webpack.components.js +++ b/build/webpack.components.js @@ -18,7 +18,8 @@ config.externals = { config.output = { path: path.join(__dirname, '../lib'), filename: '[name].js', - libraryTarget: 'umd' + libraryTarget: 'umd', + umdNamedDefine: true }; module.exports = config; diff --git a/build/webpack.config.dev.js b/build/webpack.config.dev.js index fe6710e54..d2538370d 100644 --- a/build/webpack.config.dev.js +++ b/build/webpack.config.dev.js @@ -39,7 +39,8 @@ module.exports = { output: { path: path.join(__dirname, '../docs/dist'), publicPath: '/', - filename: '[name].js' + filename: '[name].js', + umdNamedDefine: true }, devServer: { historyApiFallback: { diff --git a/build/webpack.config.prod.js b/build/webpack.config.prod.js index f7a46de6a..65cc03030 100644 --- a/build/webpack.config.prod.js +++ b/build/webpack.config.prod.js @@ -7,7 +7,8 @@ module.exports = merge(devConfig, { output: { path: path.join(__dirname, '../docs/dist'), publicPath: '/zanui/vue', - filename: '[name].[hash:8].js' + filename: '[name].[hash:8].js', + umdNamedDefine: true }, devtool: false, plugins: [ diff --git a/yarn.lock b/yarn.lock index 0159bf725..1d73db982 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5102,6 +5102,12 @@ postcss-convert-values@^2.3.4: postcss "^5.0.11" postcss-value-parser "^3.1.2" +postcss-css-reset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/postcss-css-reset/-/postcss-css-reset-1.0.2.tgz#769f2d62d3f1f76e2600fb4f79066399bebe2bd8" + dependencies: + postcss "^5.0.19" + postcss-custom-media@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-5.0.1.tgz#138d25a184bf2eb54de12d55a6c01c30a9d8bd81"