https://github.com/umijs/case-sensitive-paths-webpack-plugin
A webpack plugin to enforce case-sensitive paths when resolving module
https://github.com/umijs/case-sensitive-paths-webpack-plugin
case-sensitive plugin webpack
Last synced: 8 months ago
JSON representation
A webpack plugin to enforce case-sensitive paths when resolving module
- Host: GitHub
- URL: https://github.com/umijs/case-sensitive-paths-webpack-plugin
- Owner: umijs
- License: mit
- Created: 2022-07-13T06:31:38.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-15T12:16:51.000Z (almost 4 years ago)
- Last Synced: 2025-05-14T02:42:39.880Z (about 1 year ago)
- Topics: case-sensitive, plugin, webpack
- Language: TypeScript
- Homepage:
- Size: 118 KB
- Stars: 14
- Watchers: 7
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @umijs/case-sensitive-paths-webpack-plugin
[](https://npmjs.org/package/@umijs/case-sensitive-paths-webpack-plugin)
[](https://npmjs.org/package/@umijs/case-sensitive-paths-webpack-plugin)
[](https://codecov.io/gh/umijs/case-sensitive-paths-webpack-plugin)
[](https://github.com/umijs/case-sensitive-paths-webpack-plugin)
A webpack plugin to enforce case-sensitive paths when resolving module, similar to the well-known [case-sensitive-paths-webpack-plugin](https://github.com/Urthen/case-sensitive-paths-webpack-plugin) project.
The difference is:
1. Only compatible with Webpack 4+ & Node.js 14+
3. Ignore paths outside of current project
2. Ignore `node_modules` resources
4. Ignore `asset/inline` resources
5. Check each level paths asynchronously & in parallel
6. Higher cache utilization
So this plugin has better performance than it.
## Usage
Install:
```bash
$ npm i @umijs/case-sensitive-paths-webpack-plugin --save-dev
```
Configure in `webpack.config.js`:
```js
const CaseSensitivePathsPlugin = require('@umijs/case-sensitive-paths-webpack-plugin');
module.exports = {
plugins: [
new CaseSensitivePathsPlugin(),
],
};
```
That's all.
## Thanks
This project is inspired by [case-sensitive-paths-webpack-plugin](https://github.com/Urthen/case-sensitive-paths-webpack-plugin), thanks!
## LICENSE
[MIT](./LICENSE)