Closed argesoft closed 3 years ago
Maybe this explains better https://repl.it/@argesoft/rollup-styles-test
Hi @argesoft, sorry for the late response.
I believe the issue is that since the plugin uses custom Less importer paths are not respected properly, will fix that and let you know!
Thank you @Anidetrix Yes, the problem is related with custom importer. I've commented line 32 in the importer source and the issue resolved. But now I found a different problem.
@font-face {
font-family: 'PT Sans';
font-style: normal;
font-weight: 400;
--->> src: local('PT Sans'), local('PTSans-Regular'), url('fonts/PTS-webfont.woff') format('woff');
}
When there is a src
attribute mixed with local
, then url
is not processed at all.
Even url->resolve
option does not see it.
I just ran into this today and it would be nice to have this working so I don't have lots of ../../../
-style imports in my code. Can we get a fix please?
:tada: This issue has been resolved in version 3.12.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
@Anidetrix, Hello. I can't find comprehensive description of how certain loaders (first, less in my case) are configured. The readme says that they just work. What if I need to provide custom vars to less or configure it in any other way? Same for other loaders.
Btw, the api reference link in the readme is broken. I've located less part manually, but it seemes to be autogenerated stub.
I've consulted types.ts
for all required information.
When I provide
paths
in the less loader options, loader does not take it into account (or does not receive it). Other parameters of options work as expected, butpaths
somehow does not. When I import file only by its name (as it can be located in different folders depending on config) less loader does not scan provided paths and returns error(plugin styles) Error: Cannot find module './config.less' from '--__dirname--\src\'
.To reproduce:
package.json
rollup.config.js
./src/index.less
./src/config/config.less
The same scenario works for other less plugins. Am I doing something wrong?
Tested on windows 10, node v12.18.1