components build
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
var Components = require('../components.json');
|
||||
var config = require('./webpack.config.js');
|
||||
|
||||
delete config.devtool;
|
||||
|
||||
config.entry = Components;
|
||||
|
||||
config.output = {
|
||||
path: './lib',
|
||||
filename: '[name].js',
|
||||
libraryTarget: 'umd'
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
@@ -81,12 +81,6 @@ if (process.env.NODE_ENV === 'production') {
|
||||
NODE_ENV: 'production'
|
||||
}
|
||||
}),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {
|
||||
warnings: false
|
||||
}
|
||||
}),
|
||||
new ExtractTextPlugin(`yzvue_base_${version}_min.css`),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {
|
||||
warnings: false
|
||||
@@ -101,9 +95,7 @@ if (process.env.NODE_ENV === 'production') {
|
||||
})
|
||||
];
|
||||
} else {
|
||||
// development 环境不会抽css - -
|
||||
module.exports.plugins = [
|
||||
new ExtractTextPlugin('style.dev.css'),
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
minimize: true,
|
||||
options: {
|
||||
|
||||
Reference in New Issue
Block a user