enhanced-resolve is broken on Windows
https://github.com/webpack/enhanced-resolve/blob/c960801d5cfbb6a472e40a7fe8f6c0679955a13b/lib/AliasPlugin.js#L70
This line needs to normalize paths between unix paths and Windows. When using packages like Linaria on Windows (that depend on enhanced-resolve), aliases don't work (which is the only way to get alias with Linaria currently). The paths end up mixed slashes with the base alias path having Windows backslashes and the end concatenated on is forward slashes.
alias is string to string mapping. please provide webpack.config + what request you are trying to resolve
Closing due to inactivity. Please test with latest version and feel free to reopen if still regressions. Thanks!
The problem is still relevant. For example, if you write this code in css:
background-image:url("..\..\..\..\..\..\..\src\components\blocks\saver\[email protected]");
We will get an error
ERROR in ./.cache/css/app-dev/src/components/blocks/saver/index.css (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./.cache/css/app-dev/src/components/blocks/saver/index.css)
Module build failed (from ./node_modules/css-loader/dist/cjs.js):
Error: Can't resolve '..............src
omponents
[email protected]' in 'D:\project\www\.cache\css\app-dev\src\components\blocks\saver'
at finishWithoutResolve (D:\project\www\node_modules\enhanced-resolve\lib\Resolver.js:309:18)
@askuzminov Is it scss/sass/less? I think you are out of root of your filesystem
Raw css. After changing ..\..\..\ to ../../../ - it works as needed.