5 Star 10 Fork 5

Gitee 极速下载/vue-datepicker-local

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/weifeiyue/vue-datepicker-local
克隆/下载
webpack.config.js 1.74 KB
一键复制 编辑 原始数据 按行查看 历史
weifeiyue 提交于 2018-09-03 10:28 . bug fix #49
const path = require('path')
const webpack = require('webpack')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const banner =
'vue-datetime-local.js v1.0.19\n' +
'(c) 2017-' + new Date().getFullYear() + ' weifeiyue\n' +
'Released under the MIT License.'
module.exports = {
entry: {
app: './example/app.js'
},
output: {
filename: '[name].js'
},
module: {
rules: [{
test: /\.vue$/,
loader: 'vue-loader',
options: {
extractCSS: true,
esModule: false,
preserveWhitespace: false
}
}, {
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
}, {
test: /\.(png|jpg|gif|svg)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]?[hash]'
}
}]
},
devServer: {
historyApiFallback: true,
noInfo: true
},
performance: {
hints: false
},
plugins: [
new webpack.optimize.ModuleConcatenationPlugin(),
new ExtractTextPlugin('[name].css')
],
devtool: '#cheap-module-eval-source-map'
}
if (process.env.NODE_ENV === 'production') {
module.exports.devtool = false
module.exports.entry = {
'vue-datepicker-local': './src/index.js'
}
module.exports.output = {
path: path.resolve(__dirname, './dist'),
filename: '[name].js',
libraryTarget: 'umd',
library: '[name]'
}
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.BannerPlugin(banner),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
compress: {
warnings: false
}
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
])
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/mirrors/vue-datepicker-local.git
[email protected]:mirrors/vue-datepicker-local.git
mirrors
vue-datepicker-local
vue-datepicker-local
master

搜索帮助