You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a project, I have some components stored in separate modules, and the main module installs those modules in using npm link (i.e., creating symlinks to them from node_modules). The structure looks like this:
main, componentA and componentB all use CSS Modules. I'm running browserify from of the main module, and have css-modulesify configured with global: true
I ran into problems with css-modulesify constructing paths to filenames in componentA and componentB incorrectly. I ultimately traced this down to the rootDir option. Originally, I had rootDir set to /path/to/project/main, since I thought rootDir only controlled formatting of generated classnames. Setting rootDir to /path/to/project fixed the issues.
Is it the intended behavior for rootDir to cause css-modulesify to fail if there are any css files that are relatively 'higher' that rootDir? If it is, I think it would probably be good to change the documentation in the README to be something like:
rootDir: absolute path to your project's root directory. This is optional but providing it will result in better generated classnames. If provided, attempting to bundle any css files accessed via a parent of rootDir will fail
The text was updated successfully, but these errors were encountered:
In a project, I have some components stored in separate modules, and the main module installs those modules in using
npm link
(i.e., creating symlinks to them fromnode_modules
). The structure looks like this:main
,componentA
andcomponentB
all use CSS Modules. I'm runningbrowserify
from of the main module, and havecss-modulesify
configured withglobal: true
I ran into problems with
css-modulesify
constructing paths to filenames in componentA and componentB incorrectly. I ultimately traced this down to therootDir
option. Originally, I hadrootDir
set to/path/to/project/main
, since I thoughtrootDir
only controlled formatting of generated classnames. SettingrootDir
to/path/to/project
fixed the issues.Is it the intended behavior for
rootDir
to causecss-modulesify
to fail if there are any css files that are relatively 'higher' thatrootDir
? If it is, I think it would probably be good to change the documentation in the README to be something like:rootDir
: absolute path to your project's root directory. This is optional but providing it will result in better generated classnames. If provided, attempting to bundle any css files accessed via a parent ofrootDir
will failThe text was updated successfully, but these errors were encountered: