You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

case-sensitive-paths-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

case-sensitive-paths-webpack-plugin

Enforces module path case sensitivity in Webpack


Version published
Weekly downloads
7.4M
decreased by-0.49%
Maintainers
1
Install size
26.3 kB
Created
Weekly downloads
 

Package description

What is case-sensitive-paths-webpack-plugin?

The case-sensitive-paths-webpack-plugin is a Webpack plugin that ensures that the file paths you use in your project are case-sensitive. This is particularly useful when developing on an operating system like Windows, which is not case-sensitive, but deploying to an environment that is, such as Linux. The plugin helps prevent runtime errors in production by ensuring that all imports and requires are case-correct.

What are case-sensitive-paths-webpack-plugin's main functionalities?

Enforce case-sensitive paths

This feature ensures that all paths in your Webpack project are used in a case-sensitive manner. If a file is imported with a path that does not match the exact case of the actual file path, the plugin will cause the build to fail, alerting you to the issue.

const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');

module.exports = {
  plugins: [
    new CaseSensitivePathsPlugin()
  ]
};

Other packages similar to case-sensitive-paths-webpack-plugin

Changelog

Source

v2.4.0

  • Updating versions & tests for development 1d11967
  • Update dependencies, travis targets. 31491e0
  • Run prettier on test index. 3bf9fa2
  • Run prettier across index. f12aa57
  • Automatically generate changelog dc7765e
  • Add test case ensuring deeply nested folder case problems are caught 198c7e1
  • [#54] Unescape # in paths 7d05a0a
  • Change the pathCache to be a Map. 737dadd
  • Changelog c662bc4
  • Bump lodash from 4.17.15 to 4.17.19 08dec5d
  • Credit 30dcfc1

Readme

Source

Case Sensitive Paths - Webpack Plugin

Build Status Known Vulnerabilities npm version npm downloads bananas: ripe FOSSA Status

This Webpack plugin enforces the entire path of all required modules match the exact case of the actual path on disk. Using this plugin helps alleviate cases where developers working on OSX, which does not follow strict path case sensitivity, will cause conflicts with other developers or build boxes running other operating systems which require correctly cased paths.

Previous iterations on this same idea provide the basis for this plugin, but unfortunately do not properly check case on the entire path. This plugin fixes that. Example output:

ERROR in ./src/containers/SearchProducts.js Module not found: Error: [CaseSensitivePathsPlugin] /Users/example/yourproject/src/components/searchProducts/searchproducts.js does not match the corresponding path on disk /Users/example/yourproject/src/components/searchproducts @ ./src/containers/SearchProducts.js 9:22-84

Install

npm install --save-dev case-sensitive-paths-webpack-plugin

Usage

var CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');

var webpackConfig = {
    plugins: [
        new CaseSensitivePathsPlugin()
        // other plugins ...
    ]
    // other webpack config ...
}

Want more information? Pass {debug: true} to the plugin like so:

new CaseSensitivePathsPlugin({debug: true})

It will output every directory it reads, as well as a sum total of filesystem operations. This is mostly useful for internal debugging of the plugin, but if you find it useful, more power to you.

Demo

Check the /demo directory for a working example of the plugin in action, with tests demonstrating the effect of the plugin. See /demo/README.md for more.

Thanks & Credit

License

FOSSA Status

Keywords

FAQs

Package last updated on 22 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc