{"id":17237703,"url":"https://github.com/tizmagik/check-filename-webpack-plugin","last_synced_at":"2025-03-26T02:12:33.827Z","repository":{"id":57197423,"uuid":"64897276","full_name":"tizmagik/check-filename-webpack-plugin","owner":"tizmagik","description":"Check Filename - Webpack Plugin","archived":false,"fork":false,"pushed_at":"2016-08-04T03:19:59.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T23:27:27.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tizmagik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-04T02:58:02.000Z","updated_at":"2022-07-22T01:56:11.000Z","dependencies_parsed_at":"2022-09-16T13:11:48.086Z","dependency_job_id":null,"html_url":"https://github.com/tizmagik/check-filename-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tizmagik%2Fcheck-filename-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tizmagik%2Fcheck-filename-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tizmagik%2Fcheck-filename-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tizmagik%2Fcheck-filename-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tizmagik","download_url":"https://codeload.github.com/tizmagik/check-filename-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245573899,"owners_count":20637674,"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":[],"created_at":"2024-10-15T05:43:30.861Z","updated_at":"2025-03-26T02:12:33.806Z","avatar_url":"https://github.com/tizmagik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Check Filename - Webpack Plugin\n\nThis Webpack plugin allows you to define a regex to test filename imports and requires against. If a regex matches, it will call the function specified to generate an error string to throw during compilation.\n\nThe error looks something like:\n\n\u003e ERROR in ./test/test.js\nModule not found: Module load aborted. Only .js extensions allowed, do not use .jsx extensions.\n   For: /Users/workspace/project/src/Component.jsx\n\nGiven the following config:\n\n```js\n{\n  regex: /\\.jsx$/,\n  error: pathName =\u003e `Module load aborted. Only .js extensions allowed, do not use .jsx extensions.\\n\\tFor: ${pathName}`\n}\n```\n\n\u003e NOTE: `error` could also just be a literal string.\n\n# Install\n\n```bash\nnpm install --save-dev case-sensitive-paths-webpack-plugin\n```\n\n# Usage\n\n```js\nimport CheckFilenamePlugin from 'case-sensitive-paths-webpack-plugin';\n\nconst webpackConfig = {\n    plugins: [\n        new CheckFilenamePlugin({\n          regex: /\\.jsx$/,\n          error: pathName =\u003e `Module load aborted. Only .js extensions allowed, do not use .jsx extensions.\\n   For: ${pathName}`\n        })\n        // other plugins ...\n    ]\n    // other webpack config ...\n}\n```\n\n## Demo\n\nCheck the [/demo](demo) directory for a working example of the plugin in action, with tests demonstrating the effect of the plugin. See [/demo/README.md](demo/README.md) for more information.\n\n## Thanks \u0026 Credit\n\nThanks mostly to [Michael Pratt](https://github.com/Urthen) who wrote [case-sensitive-paths-webpack-plugin](https://github.com/Urthen/case-sensitive-paths-webpack-plugin) which this plugin is based mostly off of.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftizmagik%2Fcheck-filename-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftizmagik%2Fcheck-filename-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftizmagik%2Fcheck-filename-webpack-plugin/lists"}