diff --git a/.gitignore b/.gitignore index 558e2ddb9..41b8349a1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ .idea .vscode packages/**/lib +lib/ lib/* !lib/index.js !lib/style.css diff --git a/build/webpack.build.js b/build/webpack.build.js index 70f5f5c60..c0e0b91da 100644 --- a/build/webpack.build.js +++ b/build/webpack.build.js @@ -1,6 +1,6 @@ var webpack = require('webpack'); var getPostcssPlugin = require('./utils/postcss_pipe'); -var config = require('./webpack.config.js'); +var config = require('./webpack.config.dev.js'); config.entry = { 'vant': './src/index.js' diff --git a/build/webpack.build.min.js b/build/webpack.build.min.js index f8d432f2d..d9cdcfaa7 100644 --- a/build/webpack.build.min.js +++ b/build/webpack.build.min.js @@ -1,7 +1,9 @@ var webpack = require('webpack'); -var config = require('./webpack.config.js'); +var config = require('./webpack.build.js'); -config.output.filename = config.output.filename.replace(/\.js$/, '.min.js'); +config.entry = { + 'index': './src/index.js' +}; config.plugins = config.plugins.concat([ new webpack.optimize.UglifyJsPlugin({ diff --git a/package.json b/package.json index 374306b19..372d30c64 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "有赞vue wap组件库", "main": "lib/vant.js", "style": "lib/vant-css/index.css", + "unpkg": "lib/index.js", "files": [ "lib", "src",