mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-05-03 13:04:44 +00:00
47 lines
1.3 KiB
JavaScript
47 lines
1.3 KiB
JavaScript
import webpack from 'webpack';
|
|
import merge from 'webpack-merge';
|
|
import ExtractTextPlugin from 'extract-text-webpack-plugin';
|
|
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
|
import config from '../config';
|
|
import baseWebpackConfig from './base';
|
|
|
|
export default merge(baseWebpackConfig, {
|
|
vue: {
|
|
loaders: {
|
|
css: ExtractTextPlugin.extract('css'),
|
|
scss: ExtractTextPlugin.extract(['css', 'sass'])
|
|
}
|
|
},
|
|
plugins: [
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
compress: {
|
|
warnings: false
|
|
}
|
|
}),
|
|
new webpack.optimize.OccurenceOrderPlugin(),
|
|
new ExtractTextPlugin('[name].css'),
|
|
new HtmlWebpackPlugin({
|
|
filename: 'index.html',
|
|
template: config.indexPath,
|
|
inject: true,
|
|
minify: {
|
|
caseSensitive: true,
|
|
collapseBooleanAttributes: true,
|
|
collapseWhitespace: true,
|
|
minifyCSS: true,
|
|
minifyJS: true,
|
|
preventAttributesEscaping: true,
|
|
removeAttributeQuotes: true,
|
|
removeComments: true,
|
|
removeCommentsFromCDATA: true,
|
|
removeEmptyAttributes: true,
|
|
removeOptionalTags: true,
|
|
removeRedundantAttributes: true,
|
|
removeScriptTypeAttributes: true,
|
|
removeStyleLinkTypeAttributes: true,
|
|
useShortDoctype: true
|
|
},
|
|
chunksSortMode: 'dependency'
|
|
})
|
|
]
|
|
});
|