-
Hi Team, I am creating an extension theia with reactWidget in frontend. as I'm used to using less in my previous projects (https://webpack.js.org/loaders/less-loader/), I'd like to add it to my extension.
I've already tried adding the less-loader to the root Then add module rule in electron-app/webpack.config.js:
When I tried to build it, npm run build:electron, I got an error:
I can see that in electron-app everything is generated, because there is no src, only src-gen. Thank you very much, best regards. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hey @waikitc, I'm a bit confused by the error message. Does the |
Beta Was this translation helpful? Give feedback.
-
Hi @waikitc, You might want to try to add your rules to the frontend webpack config instead of creating your own standalone webpack configuration, e.g.
|
Beta Was this translation helpful? Give feedback.
Hi @waikitc,
In Theia we have the same issue with CSS files imported in our Typescript files. What we settled on is to refer to the
src
directory via relative path, see for example here. This way we don't need to copy the CSS files to thelib
directory while still allowing it to be resolved both from the sources and from the transpiled Javascript files.