1 Star 0 Fork 0

cbqfly / xm-charts-react

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.js 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
cuibenqiang 提交于 2020-09-24 16:26 . 优化
// ncapsulates a config for Webpack used to generate UMD builds
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const config = {
mode: 'production',
entry: './src/components',
// externals: {
// react: 'React',
// echarts: 'window.echarts',
// 'prop-types': 'PropTypes',
// },
// Compile JS files with Babel
module: {
rules: [
{ test: /\.js$/, use: { loader: 'babel-loader' }, exclude: /node_modules/ },
{
test: /\.scss$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
modules: {
localIdentName: '[local]-[hash:base64:5]',
},
},
},
'sass-loader',
],
},
],
},
output: {
library: 'xmChartsReact',
libraryTarget: 'umd',
},
// plugins: [new BundleAnalyzerPlugin()],
}
// If the environment is set to production, compress the output file
if (process.env.NODE_ENV !== 'production') {
config.optimization = {
minimize: false,
}
}
module.exports = config
1
https://gitee.com/cbq/xm-charts-react.git
git@gitee.com:cbq/xm-charts-react.git
cbq
xm-charts-react
xm-charts-react
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891