Closed manhhailua closed 8 years ago
Bumping this up
How to reproduce? What should I do with my RSK files to see the same error locally?
@frenzzy : please try @import
a css file from inside a npm package to a component css file.
Addition to above. @import
CSS file which include url('./')
with relative path to images in the same or relative directory.
A straightforward example is I am trying to include https://github.com/kenwheeler/slick/blob/master/slick/slick-theme.css in my css using @import
Inside home.css
@import '../../../node_modules/slick-carousel/slick/slick-theme.css';
The CSS resolution works fine. slick-carousel
is npm package name for above CSS.
Any CSS rule inside using url()
is not working and tries to resolve it with respect to current module ie home in this case.
ERROR in ./~/css-loader?{"sourceMap":true,"modules":true,"localIdentName":"[local]","minimize":false}!./~/postcss-loader?pack=default!./src/routes/home/Home.css
Module not found: Error: Cannot resolve 'file' or 'directory' ./ajax-loader.gif in /Users/vishwanatha/react-starter-kit-5/src/routes/home
@ ./~/css-loader?{"sourceMap":true,"modules":true,"localIdentName":"[local]","minimize":false}!./~/postcss-loader?pack=default!./src/routes/home/Home.css 6:3012-3040
ERROR in ./~/css-loader?{"sourceMap":true,"modules":true,"localIdentName":"[local]","minimize":false}!./~/postcss-loader?pack=default!./src/routes/home/Home.css
Module not found: Error: Cannot resolve 'file' or 'directory' ./fonts/slick.eot in /Users/vishwanatha/react-starter-kit-5/src/routes/home
@ ./~/css-loader?{"sourceMap":true,"modules":true,"localIdentName":"[local]","minimize":false}!./~/postcss-loader?pack=default!./src/routes/home/Home.css 6:3204-3232 6:3257-3285
ERROR in ./~/css-loader?{"sourceMap":true,"modules":true,"localIdentName":"[local]","minimize":false}!./~/postcss-loader?pack=default!./src/routes/home/Home.css
Module not found: Error: Cannot resolve 'file' or 'directory' ./fonts/slick.woff in /Users/vishwanatha/react-starter-kit-5/src/routes/home
@ ./~/css-loader?{"sourceMap":true,"modules":true,"localIdentName":"[local]","minimize":false}!./~/postcss-loader?pack=default!./src/routes/home/Home.css 6:3335-3364
ERROR in ./~/css-loader?{"sourceMap":true,"modules":true,"localIdentName":"[local]","minimize":false}!./~/postcss-loader?pack=default!./src/routes/home/Home.css
Module not found: Error: Cannot resolve 'file' or 'directory' ./fonts/slick.ttf in /Users/vishwanatha/react-starter-kit-5/src/routes/home
@ ./~/css-loader?{"sourceMap":true,"modules":true,"localIdentName":"[local]","minimize":false}!./~/postcss-loader?pack=default!./src/routes/home/Home.css 6:3394-3422
ERROR in ./~/css-loader?{"sourceMap":true,"modules":true,"localIdentName":"[local]","minimize":false}!./~/postcss-loader?pack=default!./src/routes/home/Home.css
Module not found: Error: Cannot resolve 'file' or 'directory' ./fonts/slick.svg in /Users/vishwanatha/react-starter-kit-5/src/routes/home
@ ./~/css-loader?{"sourceMap":true,"modules":true,"localIdentName":"[local]","minimize":false}!./~/postcss-loader?pack=default!./src/routes/home/Home.css 6:3456-3484
This issue does not related to isomorphic-style-loader, please see: https://github.com/kriasoft/react-starter-kit/pull/920
Great turnaround time. Didn't expect a resolution today being Sunday, or maybe I am in different time zone. Checked that branch. Works fine. Thanks for great work.
I'm using React-Starter-Kit and trying to integrate with AdminLTE. When I imported a css from AdminLTE I got this error.
If I change the background url from
url(blue.png)
tourl("./blue.png")
, the error "Cannot resolve module" will disappear but the error "Unexpected token ." still exist.