3 Star 0 Fork 0

Gitee 极速下载/better-keyboard

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/xwpongithub/better-keyboard
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.prod.js 3.51 KB
一键复制 编辑 原始数据 按行查看 历史
春佳复读机 提交于 2017-04-22 23:11 +08:00 . add close methods and callback
const path = require('path');
const webpack = require('webpack');
const pkgConfig = require('./package.json');
const version = pkgConfig.version;
module.exports = {
entry: './src/index',
devtool:'#source-map',
output:{
path:path.resolve(__dirname,'build'),
filename:'jkeyboard.min.js',
library:'JKeyboard',
libraryTarget: "umd"
},
resolve: {
extensions: ['.js','.styl']
},
module: {
rules: [
{
test: /\.js$/,
enforce: 'pre',
exclude: /node_modules/,
use: [{
loader: 'eslint-loader',
options: {
formatter: require('eslint-friendly-formatter')
}
}],
},
{
test: /\.js$/,
use: ['babel-loader'],
exclude:/node_modules/,
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: '/img/[name].[hash:7].[ext]'
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: '/fonts/[name].[hash:7].[ext]'
}
},
{
test:/\.css$/,
use:[
"style-loader",
{
"loader":"css-loader",
"options":{"minimize":false,"sourceMap":false}
},
{
"loader":'postcss-loader',
"options":{
plugins:function(){
return [
require('autoprefixer')({
browsers: ["> 1%",
"last 2 versions",
"not ie <= 8"]
})
];
}
}
}
]
},
{
test:/\.styl$/,
use:[
"style-loader",
{
"loader":"css-loader",
"options":{"minimize":false,"sourceMap":false}
},
{
"loader":'postcss-loader',
"options":{
plugins:function(){
return [
require('autoprefixer')({
browsers: ["> 1%",
"last 2 versions",
"not ie <= 8"]
})
];
}
}
},
{
"loader":"stylus-loader",
"options":{"sourceMap":false}
}
]
}
]
},
plugins: [
new webpack.DefinePlugin({
__VERSION__: JSON.stringify(version)
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
sourceMap:false
})
]
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/mirrors/better-keyboard.git
git@gitee.com:mirrors/better-keyboard.git
mirrors
better-keyboard
better-keyboard
master

搜索帮助