Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including case-sensitive-paths-webpack-plugin with all npm packages installed. Try it out:

var caseSensitivePathsWebpackPlugin = require("case-sensitive-paths-webpack-plugin")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

case-sensitive-paths-webpack-plugin v2.2.0

Enforces module path case sensitivity in Webpack

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


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


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.


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

Thanks & Credit


FOSSA Status

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free