fluid-tailwind icon indicating copy to clipboard operation
fluid-tailwind copied to clipboard

Error when using esm.sh

Open christianmagill opened this issue 1 year ago • 4 comments

I've recently over the past couple days started receiving an error when using Winden/Yabe Suil for Wordress

import { fluidExtractor, fluidCorePlugins, defaultThemeScreensInRems, defaultThemeFontSizeInRems } from 'https://esm.sh/fluid-tailwind?bundle-deps&external=fs';

Config Error SyntaxError: The requested module '/v135/[email protected]/X-ZS9mcw/es2022/lib/corePlugins.js' does not provide an export named 'corePlugins'

It was previously working.

christianmagill avatar May 02 '24 19:05 christianmagill

Hmm, it looks like a regression in the last update. Could you try https://esm.sh/[email protected]?bundle-deps&external=fs for now? I'll look into the cause and try to push a fix in the meantime 🤔

barvian avatar May 02 '24 19:05 barvian

Yes, reverting to the previous version fixes the issue.

christianmagill avatar May 02 '24 19:05 christianmagill

+1

krstivoja avatar May 03 '24 20:05 krstivoja

I've opened an issue with ESM.sh because I can't seem to find what changed between versions to cause this breakage 🤔

barvian avatar May 08 '24 20:05 barvian

This should be fixed with v0.3.6. Here's a working StackBlitz that should be adaptable to Winden/Yabe Suil. Note the (currently undocumented) option passed to the plugin:

plugins: [
  fluid({
    checkExtractConfig: false
  })
]

This was necessary because it seems Tailwind Play ignores or overrides the extractor passed in (though it works without one).

Feel free to comment if you're still experiencing issues!

barvian avatar May 26 '24 14:05 barvian

Awesome stuff @barvian. Updated our documentation for Winden and I can confirm that this setup is working now: https://docs.dplugins.com/winden/fluid-tailwind/

krstivoja avatar May 26 '24 15:05 krstivoja