2 Star 0 Fork 0

mirrors_ReneNyffenegger/cytoscape.js-avsdf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 992 Bytes
一键复制 编辑 原始数据 按行查看 历史
alihanokka 提交于 2019-03-14 17:19 . Code Refactoring.
const path = require('path');
const pkg = require('./package.json');
const camelcase = require('camelcase');
const process = require('process');
const webpack = require('webpack');
const env = process.env;
const NODE_ENV = env.NODE_ENV;
const MIN = env.MIN;
const PROD = NODE_ENV === 'production';
let config = {
devtool: PROD ? false : 'inline-source-map',
entry: './src/index.js',
output: {
path: path.join( __dirname ),
filename: pkg.name + '.js',
library: camelcase( pkg.name ),
libraryTarget: 'umd'
},
module: {
rules: [
{ test: /\.js$/, exclude: /node_modules/, use: 'babel-loader' }
]
},
externals: PROD ? {
'avsdf-base': {
commonjs2: 'avsdf-base',
commonjs: 'avsdf-base',
amd: 'avsdf-base',
root: 'avsdfBase'
}
} : {},
plugins: MIN ? [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
drop_console: false,
}
})
] : []
};
module.exports = config;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_ReneNyffenegger/cytoscape.js-avsdf.git
git@gitee.com:mirrors_ReneNyffenegger/cytoscape.js-avsdf.git
mirrors_ReneNyffenegger
cytoscape.js-avsdf
cytoscape.js-avsdf
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385