kaelansmith / tailwind-extended-shadows

TailwindCSS utility classes for fine-grain control over box-shadows, including layers.
https://play.tailwindcss.com/6rFqo93e6h
29 stars 0 forks source link

Import: Unknown file extension ".ts" #2

Closed 2gen closed 1 month ago

2gen commented 2 months ago

Hello, I am trying to use your plugin with RootsIO Sage.

Sage's deployment of Tailwind you cannot "require" in the tailwind.config.js and instead you need to import the modules at the top: https://discourse.roots.io/t/tailwind-config-js-and-require-vs-import-esm/27914

However when I attempt to do that with this plugin I get an error.

tailwind.config.js:

/** @type {import('tailwindcss').Config} config */
import { extendedShadowsPlugin } from 'tailwind-extended-shadows';

const config = {
  plugins: [
    extendedShadowsPlugin
  ],
};

export default config;

Error on compile: Unknown file extension ".ts" for node_modules/tailwind-extended-shadows/dist/index.d.ts

Any ideas?

Thanks!

kaelansmith commented 1 month ago

Thanks for the bug report and sorry for the delay! I'm pretty sure this issue was due to a misconfiguration of the package's package.json exports > import path. I've fixed this in 0.4.1 so please upgrade and let me know if that solves it for you.

2gen commented 1 month ago

@kaelansmith Thank you this has fixed our issue.