Closed mrmartineau closed 2 weeks ago
It doesn't support resolving from node_modules out of the box. @import
works like in the browser where it accepts a relative path. So you could do @import './path/to/node_modules/@radix-ui/colors-gray.css'
for example. Or you could implement a custom resolver to handle it: https://lightningcss.dev/bundling.html#custom-resolvers
Hi @devongovett, thanks for your response, is there not a resolver that already exists? If not, I will see if I get the time to create one, so for now I have inlined some of the Radix colours.
I am trying to import some Radix UI colors but it breaking my build.
Radix colors have been installed to my project:
yarn add @radix-ui/colors
Here's my source file:
Here's my build script:
I get this error when the
@import '@radix-ui/colors/gray.css';
line is added:Does Lightning support this?