Download react-grid-layout/webpack-examples.config.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.45 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-grid-layout/webpack-examples.config.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-grid-layout/webpack-examples.config.js
-
curl -L -o webpack-examples.config.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-grid-layout/webpack-examples.config.js
1.45 kB
| ; | |
| 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/00-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; | |
| } | |