依赖更新 && 构建调整 (#60)

* upgrade dependencies

* 更改所有 saladcss 写法

* fix: 升级依赖导致的样式错误

* fix: build vant css

* use es module when pack && webpack scope hoisting

* fix: vue module version

* delete unused npm script

* fix: build:vant script not work

* fix: webpack config format

* fix: build minify vant.js

* fix: captain ui relative link
This commit is contained in:
neverland
2017-07-28 11:02:33 +08:00
committed by Yao
parent 31bc31af81
commit 50983ca28e
68 changed files with 3678 additions and 3149 deletions

View File

@@ -1,13 +1,13 @@
var webpack = require('webpack');
var getPostcssPlugin = require('./utils/postcss_pipe');
var config = require('./webpack.config.dev.js');
const webpack = require('webpack');
const config = require('./webpack.config.dev.js');
const isMinify = process.argv.indexOf('-p') !== -1;
config.entry = {
'vant': './src/index.js'
};
config.output = {
filename: './lib/[name].js',
filename: isMinify ? './lib/[name].min.js' : './lib/[name].js',
library: 'vant',
libraryTarget: 'umd',
umdNamedDefine: true
@@ -30,18 +30,13 @@ config.plugins = [
minimize: true,
debug: false,
options: {
postcss: getPostcssPlugin,
babel: {
presets: ['es2015'],
plugins: ['transform-runtime', 'transform-vue-jsx']
},
vue: {
autoprefixer: false,
preserveWhitespace: false,
postcss: getPostcssPlugin
preserveWhitespace: false
}
}
})
}),
new webpack.optimize.ModuleConcatenationPlugin()
];
delete config.devtool;