mirror of
https://github.com/youzan/vant.git
synced 2025-10-15 23:55:08 +00:00
webpack config
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
var webpack = require('webpack');
|
||||
var getPostcssPlugin = require('./utils/postcss_pipe');
|
||||
var config = require('./webpack.config.js');
|
||||
|
||||
config.entry = {
|
||||
@@ -14,6 +16,28 @@ config.externals = {
|
||||
vue: 'vue'
|
||||
};
|
||||
|
||||
config.plugins = [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': '"production"'
|
||||
}),
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
minimize: true,
|
||||
debug: false,
|
||||
options: {
|
||||
postcss: getPostcssPlugin,
|
||||
babel: {
|
||||
presets: ['es2015'],
|
||||
plugins: ['transform-runtime', 'transform-vue-jsx']
|
||||
},
|
||||
vue: {
|
||||
autoprefixer: false,
|
||||
preserveWhitespace: false,
|
||||
postcss: getPostcssPlugin
|
||||
}
|
||||
}
|
||||
})
|
||||
];
|
||||
|
||||
delete config.devtool;
|
||||
|
||||
module.exports = config;
|
||||
|
Reference in New Issue
Block a user