stimulus-datepicker icon indicating copy to clipboard operation
stimulus-datepicker copied to clipboard

fix css import with webpack

Open calunia opened this issue 2 years ago • 5 comments

Hello, Actually, when i try to import the css with webpack encore, i got the error : Module not found: Error: Package path ./css/datepicker.css is not exported from package node_modules/stimulus-datepicker (see exports field in node_modules/stimulus-datepicker/package.json)

Change "exports": "./src/datepicker.js",

to

"files": [
    "css/",
    "src/"
  ],

Fix this issue for me but i don't know how i can run your tests :/ So i open this pr if it can help someone :) Thx Calunia

calunia avatar Aug 30 '23 09:08 calunia

Thanks for this.

I really have no idea what I'm doing with package.json! There's plenty of documentation online but somehow it never quite explains anything.

I'll try this on my own app (which use import-maps) to check it keeps working.

airblade avatar Aug 30 '23 10:08 airblade