melloware / coloris-npm

A lightweight and elegant JavaScript color picker.
MIT License
34 stars 9 forks source link

Angular 15 no loaders are configured to process coloris.css #97

Closed joshua22s closed 1 year ago

joshua22s commented 1 year ago

I am trying to use the colorpicker in an Anguar 15 project but I get an error when running the project:

./node_modules/@melloware/coloris/dist/coloris.css?ngGlobalStyle:1:0 - Error: Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> .clr-picker {
|   display: none;
|   flex-wrap: wrap;
melloware commented 1 year ago

And you are adding it to your Angular component like this:

import "@melloware/coloris/dist/coloris.css";
import Coloris from "@melloware/coloris";

???

Can you create a small code sandbox reproducer?

blutorange commented 1 year ago

Yes, a reproducer would be very helpful. Form the description it sounds more like an issue with your build system? It sounds like it's trying to bundle a CSS file, but can't parse the CSS syntax, e.g. because no webpack CSS loader was defined?

GedMarc commented 1 year ago

Something like that 👍Still busy on the angular plug-in but the css is also in wrong spot.

Angular.json, styles section, include it there