2 Star 0 Fork 0

mirrors_wuchangming / vConsole

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.js 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
Maiz 提交于 2016-07-13 16:31 . add json-loader
var pkg = require('./package.json');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: false,
entry: {
vconsole : './src/vconsole.js'
},
output: {
path: './dist',
filename: '[name].min.js',
library: 'vConsole',
libraryTarget: 'umd',
umdNameDefine: true
},
module: {
loaders: [
{
test: /\.html$/, loader: 'html'
},
{
test: /\.js$/, loader: 'babel'
},
{
test: /\.less$/,
loader: 'style!css!less'
// loader: ExtractTextPlugin.extract('style-loader', 'css-loader!less-loader') // 将css独立打包
},
{
test: /\.json$/, loader: 'json'
}
]
},
plugins: [
new webpack.BannerPlugin([
pkg.name + ' v' + pkg.version + ' (' + pkg.homepage + ')',
'Copyright ' + new Date().getFullYear() + ', ' + pkg.author,
pkg.license +' license'
].join('\n'))
,new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
// ,new ExtractTextPlugin('[name].min.css') // 将css独立打包
]
};
1
https://gitee.com/mirrors_wuchangming/vConsole.git
git@gitee.com:mirrors_wuchangming/vConsole.git
mirrors_wuchangming
vConsole
vConsole
dev

搜索帮助