Closed ChriD closed 7 years ago
I'm interested in this too, but with just regular CSS.
I'm looking into https://www.npmjs.com/package/babel-plugin-css-modules-transform (which I acknowledge their disclaimer that it is experimental), but can't seem to get it to work.
Node's module system only imports JS, importing CSS via an import
statement is a weird Webpack hack. Using the link
tag is the way to do it in electron-compile (if you need to do it at runtime, create a link tag via document.createElement
, then append it to head
)
Hi, Is it possible to import a .less file within a component, so that the imported styles get unique id's by the compiler? I have tried and i am getting an error when importing a .less file
import styles from './test.less';
test.less:
importing the file in html via
<link>
works I have to admit i am new to electron. It may be that i am making silly mistakes