66 Star 343 Fork 80

GVPrsuite/rsuite

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
simonguo 提交于 7年前 . Update config
const path = require('path');
const webpack = require('webpack');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const __DEV__ = process.env.NODE_ENV === 'development';
const filename = __DEV__ ? '[name].js' : '[name].min.js';
module.exports = {
entry: {
rsuite: path.join(__dirname, 'src')
},
output: {
path: path.join(__dirname, 'dist'),
filename,
library: 'rsuite',
libraryTarget: 'umd'
},
externals: {
react: {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react'
},
'react-dom': {
root: 'ReactDOM',
commonjs2: 'react-dom',
commonjs: 'react-dom',
amd: 'react-dom'
}
},
module: {
rules: [
{
test: /\.jsx?$/,
use: ['babel-loader?babelrc'],
exclude: /node_modules/
}
]
},
plugins: [
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new webpack.SourceMapDevToolPlugin({
filename: `${filename}.map`
})
]
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/rsuite/rsuite.git
git@gitee.com:rsuite/rsuite.git
rsuite
rsuite
rsuite
3.0.0

搜索帮助