{"id":15103194,"url":"https://github.com/phothinmg/webpack-react-typescript-mdx-boilerplate","last_synced_at":"2026-02-14T09:02:27.943Z","repository":{"id":225270596,"uuid":"765524877","full_name":"phothinmg/webpack-react-typescript-mdx-boilerplate","owner":"phothinmg","description":"Webpack React Typescript Mdx Boilerplate","archived":false,"fork":false,"pushed_at":"2024-03-01T16:01:39.000Z","size":27334,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T22:46:51.201Z","etag":null,"topics":["mdx-js","react","stater-kit","typescript","webpack"],"latest_commit_sha":null,"homepage":"https://webpack-react-typescript-mdx-boilerplate.vercel.app","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phothinmg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-01T04:53:57.000Z","updated_at":"2024-04-17T06:14:54.000Z","dependencies_parsed_at":"2024-03-01T05:40:28.191Z","dependency_job_id":"2730113a-b2fa-41d0-8a74-5caafc2a1f1e","html_url":"https://github.com/phothinmg/webpack-react-typescript-mdx-boilerplate","commit_stats":{"total_commits":12,"total_committers":2,"mean_commits":6.0,"dds":"0.16666666666666663","last_synced_commit":"377cc66acd94dcad42239e8e617c60d57c71bd0b"},"previous_names":["phothinmg/wbpack-react-typescript-mdx-boilerplate"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phothinmg%2Fwebpack-react-typescript-mdx-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phothinmg%2Fwebpack-react-typescript-mdx-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phothinmg%2Fwebpack-react-typescript-mdx-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phothinmg%2Fwebpack-react-typescript-mdx-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phothinmg","download_url":"https://codeload.github.com/phothinmg/webpack-react-typescript-mdx-boilerplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332525,"owners_count":20921852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mdx-js","react","stater-kit","typescript","webpack"],"created_at":"2024-09-25T19:22:03.905Z","updated_at":"2025-10-06T13:03:39.448Z","avatar_url":"https://github.com/phothinmg.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Webpack React Typescript Mdx Boilerplate\n\n---\n\nLive Example: https://webpack-react-typescript-mdx-boilerplate.vercel.app/\n\n---\n\nDownload or clone the repo.\n\n```bash\npnpm i\n```\n\n```bash\npnpm dev\n```\n\nDev server at : http://localhost:5454\n\nYou can edit this page at -\u003e `app/post.mdx`\n\n---\n\n## **About**\n\nOnly how to configure Webpack for React, Typescript and support MDX.\nSee in `webpack.config.json`.\n\n---\n\n## Example Config File\n\n```js\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport HtmlWebpackPlugin from \"html-webpack-plugin\";\nimport MiniCssExtractPlugin from \"mini-css-extract-plugin\";\nimport FaviconsWebpackPlugin from \"favicons-webpack-plugin\";\nimport remarkGfm from \"remark-gfm\";\nimport rehypePrism from \"rehype-prism-plus\";\nimport remarkEmbedImages from \"remark-embed-images\";\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\n/** @type {import('webpack').Configuration} */\n\nconst webpackConfig = {\n  mode: \"development\",\n  entry: \"./app/index.tsx\",\n  output: {\n    path: path.resolve(__dirname, \"./dist\"),\n    filename: \"bundle.js\",\n  },\n  devServer: {\n    static: {\n      directory: path.resolve(__dirname, \"./dist\"),\n    },\n    port: 5454,\n    open: true,\n    hot: true,\n    compress: true,\n    historyApiFallback: true,\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.tsx?$/,\n        exclude: /node_modules/,\n        use: [\n          {\n            loader: \"babel-loader\",\n            options: {\n              presets: [\n                \"@babel/preset-env\",\n                \"@babel/preset-react\",\n                \"@babel/preset-typescript\",\n              ],\n            },\n          },\n          {\n            loader: \"ts-loader\",\n          },\n        ],\n      },\n      {\n        test: /\\.css$/,\n        use: [MiniCssExtractPlugin.loader, \"css-loader\"],\n      },\n      {\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        use: {\n          loader: \"babel-loader\",\n          options: {\n            presets: [\"@babel/preset-env\"],\n          },\n        },\n      },\n      {\n        test: /\\.mdx?$/,\n        use: [\n          {\n            loader: \"babel-loader\",\n            options: {\n              presets: [\"@babel/preset-env\", \"@babel/preset-react\"],\n              plugins: [\"@babel/plugin-transform-object-rest-spread\"],\n            },\n          },\n          {\n            loader: \"@mdx-js/loader\",\n            /** @type {import('@mdx-js/loader').Options} */\n            options: {\n              providerImportSource: \"@mdx-js/react\",\n              remarkPlugins: [remarkGfm, remarkEmbedImages],\n              rehypePlugins: [rehypePrism],\n            },\n          },\n        ],\n        exclude: /node_modules/,\n      },\n      {\n        test: /\\.svg$/,\n        loader: \"svg-inline-loader\",\n      },\n    ],\n  },\n  resolve: {\n    extensions: [\".tsx\", \".ts\", \".js\", \".css\", \".md\", \".mdx\"],\n  },\n  plugins: [\n    new HtmlWebpackPlugin({\n      title: \"Home\",\n      filename: \"index.html\",\n      template: \"./app/index.html\",\n    }),\n    new MiniCssExtractPlugin(),\n    new FaviconsWebpackPlugin(\"./app/favicon.ico\"),\n  ],\n};\n\nexport default webpackConfig;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphothinmg%2Fwebpack-react-typescript-mdx-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphothinmg%2Fwebpack-react-typescript-mdx-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphothinmg%2Fwebpack-react-typescript-mdx-boilerplate/lists"}