mirror of
https://github.com/youzan/vant.git
synced 2025-10-15 23:55:08 +00:00
依赖更新 && 构建调整 (#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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user