1 Star 1 Fork 75

JackEasons/rsuite

forked from rsuite/rsuite 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.js 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
simonguo 提交于 2019-07-31 14:13 . Migrate from flow to typescript (#531)
const path = require('path');
const webpack = require('webpack');
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
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: /\.ts|tsx?$/,
use: ['babel-loader?babelrc'],
exclude: /node_modules/
}
]
},
plugins: [
new LodashModuleReplacementPlugin(),
new webpack.SourceMapDevToolPlugin({
filename: `${filename}.map`
})
],
resolve: {
extensions: ['.ts', '.tsx', '.js']
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/JackEasons/rsuite.git
[email protected]:JackEasons/rsuite.git
JackEasons
rsuite
rsuite
master

搜索帮助