1 Star 0 Fork 0

AlanWater/react-grid-layout

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
var webpack = require("webpack");
// Builds bundle usable <script>. Includes RGL and all deps, excluding React.
module.exports = {
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",
// React dep should be available as window.React, not window.react
"root": "ReactDOM"
}
},
module: {
loaders: [
{test: /\.jsx?$/, exclude: /node_modules/, loader: "babel-loader"}
]
},
plugins: [
new webpack.DefinePlugin({
"process.env": {
NODE_ENV: JSON.stringify("production")
}
}),
// Compress, but don't print warnings to console
new webpack.optimize.UglifyJsPlugin({compress: {warnings: false}, sourceMap: true}),
new webpack.optimize.ModuleConcatenationPlugin(),
],
resolve: {
extensions: [".js", ".jsx"]
}
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/AlanWater/react-grid-layout.git
git@gitee.com:AlanWater/react-grid-layout.git
AlanWater
react-grid-layout
react-grid-layout
master

搜索帮助