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
I have a css file (src/main.css) that imports another CSS file with a mixin:
@import "./mixins/fonts";
The mixin css file loads a variable:
@value title_font from '../variables/fonts.css';
But when running npm run webpack, I receive the error:
ERROR in ./node_modules/css-loader?{"importLoaders":1}!./node_modules/postcss-loader/lib!./src/main.css
Module not found: Error: Can't resolve '../variables/fonts.css' in '/postcss-import-values-mixins/src'
If I change the path to the variables css file to this:
@value title_font from './variables/fonts.css';
(using . rather than ..)
...then it works. But this is not the correct path relative to the file it is in.
This seems to indicate that postcss is trying to process the path to the src/variables/fonts.css file relative to src/main.css, rather than relative to src/mixins/fonts.css.
Is this a bug, or is there an issue with my configuration?
The text was updated successfully, but these errors were encountered:
See this example project:
https://github.com/penx/postcss-import-values-mixins
I have a css file (src/main.css) that imports another CSS file with a mixin:
The mixin css file loads a variable:
But when running
npm run webpack
, I receive the error:If I change the path to the variables css file to this:
(using . rather than ..)
...then it works. But this is not the correct path relative to the file it is in.
This seems to indicate that postcss is trying to process the path to the
src/variables/fonts.css
file relative tosrc/main.css
, rather than relative tosrc/mixins/fonts.css
.Is this a bug, or is there an issue with my configuration?
The text was updated successfully, but these errors were encountered: