1 Star 0 Fork 4

kkaaddff/react-grid-layout

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.js 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
Samuel Reed 提交于 2020-03-11 17:07 . Add enzyme testing. (#1163)
// @flow
const webpack = require("webpack");
// Builds bundle usable <script>. Includes RGL and all deps, excluding React.
module.exports = {
mode: "production",
optimization: {
minimize: true
},
context: __dirname,
entry: {
"react-grid-layout": "./index-dev.js"
},
output: {
path: __dirname + "/dist",
filename: "[name].min.js",
libraryTarget: "umd",
library: "ReactGridLayout"
},
devtool: "source-map",
externals: {
react: {
commonjs: "react",
commonjs2: "react",
amd: "react",
// React dep should be available as window.React, not window.react
root: "React"
},
"react-dom": {
commonjs: "react-dom",
commonjs2: "react-dom",
amd: "react-dom",
root: "ReactDOM"
}
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: "babel-loader",
query: {
cacheDirectory: true
}
}
]
},
plugins: [
new webpack.DefinePlugin({
"process.env": {
NODE_ENV: JSON.stringify("production")
}
}),
new webpack.optimize.ModuleConcatenationPlugin()
],
resolve: {
extensions: [".js", ".jsx"]
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kkaaddff/react-grid-layout.git
git@gitee.com:kkaaddff/react-grid-layout.git
kkaaddff
react-grid-layout
react-grid-layout
master

搜索帮助