4 Star 2 Fork 4

Gitee 极速下载/react-grid-layout

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/STRML/react-grid-layout
克隆/下载
webpack-examples.config.js 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
"use strict";
const webpack = require("webpack");
const fs = require("fs");
// Builds example bundles
module.exports = {
mode: "development",
context: __dirname,
entry: {},
optimization: {
splitChunks: {
cacheGroups: {
commons: {
name: "commons",
chunks: "all",
minChunks: 1
}
}
}
},
output: {
path: __dirname + "/examples",
filename: "[name].js",
sourceMapFilename: "[file].map",
publicPath: "auto"
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: "babel-loader",
options: {
cacheDirectory: true
}
}
]
},
plugins: [
new webpack.DefinePlugin({
"process.env.STATIC_EXAMPLES": JSON.stringify(true)
})
],
devServer: {
compress: true,
port: 4002,
open: "/react-grid-layout/examples/0-showcase.html",
client: {
overlay: true
},
static: {
directory: ".",
publicPath: "/react-grid-layout"
}
},
resolve: {
extensions: [".js", ".jsx"],
alias: { "react-grid-layout": __dirname + "/index-dev.js" }
}
};
// Load all entry points
const files = fs
.readdirSync(__dirname + "/test/examples")
.filter(element => element.match(/^.+\.jsx$/));
for (const file of files) {
const module_name = file.replace(/\.jsx$/, "");
module.exports.entry[module_name] = "./test/examples/" + file;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/react-grid-layout.git
git@gitee.com:mirrors/react-grid-layout.git
mirrors
react-grid-layout
react-grid-layout
master

搜索帮助