css-modules / css-modules-loader-core

A loader-agnostic CSS Modules implementation, based on PostCSS
91 stars 34 forks source link

sourcePath prefix '/' no such file or directory #230

Open lomocc opened 6 years ago

lomocc commented 6 years ago

https://github.com/css-modules/css-modules-loader-core/blob/3d8377003ea87f8a32d094b36b1d7bd2abba360f/src/index.js#L18

in windows the sourcePath looks like D:/HTML5/..., and will be transform to /D:/HTML5/.... cause

 no such file or directory, open 'D:\D:\HTML5\...\Typography.css'

should it be:

.process( sourceString, { from: sourcePath} ) 

?