Closed onetrev closed 6 years ago
I believe this is because lity
has the main
property in the package.json pointing to the dist/lity.js
file:
https://github.com/jsor/lity/blob/master/package.json#L11
In the case of the animate.css
and other css packages (like normalize.css
) themain
property is pointed at the actual CSS file.
You will need to use the full path in this case, as you've identified.
Gotcha. All good then. Explains why it works sometimes and not others. Thanks a ton for the follow up. PS, I really like SUIT CSS.
I'm finding node_module import a bit hit and miss with my main SCSS import in Webpack + MiniCssExtract. Some seem to work, some don't. For example...
@import "animate.css";
-> this import works perfectly and loads the animate.css module. Note the .css is there because that's the name of the actual node module.However,
@import "lity";
does not work and I receive this error below. Looks like the problem is it trying to use the .js file instead of the css?So for that module I have to put in the full path like so to import the file:
@import "/node_modules/lity/dist/lity.css";